14 Nov, 2008

2 commits

  • Attach creds to file structs and discard f_uid/f_gid.

    file_operations::open() methods (such as hppfs_open()) should use file->f_cred
    rather than current_cred(). At the moment file->f_cred will be current_cred()
    at this point.

    Signed-off-by: David Howells
    Reviewed-by: James Morris
    Signed-off-by: James Morris

    David Howells
     
  • Pass credentials through dentry_open() so that the COW creds patch can have
    SELinux's flush_unauthorized_files() pass the appropriate creds back to itself
    when it opens its null chardev.

    The security_dentry_open() call also now takes a creds pointer, as does the
    dentry_open hook in struct security_operations.

    Signed-off-by: David Howells
    Acked-by: James Morris
    Signed-off-by: James Morris

    David Howells
     

27 Jul, 2008

1 commit


22 May, 2008

1 commit

  • Fallout from commit 46d7b522ebf486edbd096965d534cc6465e9e309 ("uml: move
    hppfs_kern.c to hppfs.c")

    Signed-off-by: Al Viro
    Acked-by: Jeff Dike
    Signed-off-by: Linus Torvalds

    Al Viro
     

13 May, 2008

2 commits

  • There's no reason for the _kern in hppfs_kern.c, so move it to hppfs.c.

    Signed-off-by: Jeff Dike
    Cc: WANG Cong
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     
  • hppfs tidying and fixes noticed during hch's get_inode work -
    style fixes
    a copy_to_user got its return value checked
    hppfs_write no longer fiddles file->f_pos because it gets and
    returns pos in its arguments
    hppfs_delete_inode dputs the underlyng procfs dentry stored in
    its private data and mntputs the vfsmnt stashed in s_fs_info
    hppfs_put_super no longer needs to mntput the s_fs_info, so it
    no longer needs to exist
    hppfs_readlink and hppfs_follow_link were doing a bunch of stuff
    with a struct file which they didn't use
    there is now a ->permission which calls generic_permission
    get_inode was always returning 0 for some reason - it now
    returns an inode if nothing bad happened

    Signed-off-by: Jeff Dike
    Cc: WANG Cong
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jeff Dike
     

19 Mar, 2008

2 commits

  • * hppfs_iget() and its users are racy; there's no need to pollute icache
    anyway, new_inode() works fine and is safe, unlike the current kludges
    (these relied on overwriting ->i_ino before another iget_locked() gets
    to that one - and did it after unlocking).
    * merge hppfs_iget()/init_inode()/hppfs_read_inode(), while we are
    at it.
    * to pass proper vfsmount to dentry_open() store the reference
    in hppfs superblock.

    Signed-off-by: Al Viro
    --

    Al Viro
     
  • Here's patch for hppfs that uses vfs_kern_mount to make sure it always has a
    procfs instance and passed the vfsmount on through the inode private data.
    Also fixes a procfs file_system_type leak for every attempted hppfs mount.

    [ jdike - gave this file a style workover, plus deleted hppfs_dentry_ops ]

    Acked-by: Al Viro
    Signed-off-by: Christoph Hellwig
    Signed-off-by: Jeff Dike
    Signed-off-by: Dave Hansen
    Signed-off-by: Andrew Morton
    Signed-off-by: Al Viro

    Dave Hansen
     

08 Feb, 2008

1 commit

  • Stop the HPPFS filesystem from using iget() and read_inode(). Provide an
    hppfs_iget(), and call that instead of iget(). hppfs_iget() then uses
    iget_locked() directly and returns a proper error code instead of an inode in
    the event of an error.

    hppfs_fill_sb_common() returns any error incurred when getting the root inode
    instead of EINVAL.

    Note that the contents of hppfs_kern.c need to be examined:

    (*) The HPPFS inode retains a pointer to the proc dentry it is shadowing, but
    whilst it does appear to retain a reference to it, it doesn't appear to
    destroy the reference if the inode goes away.

    (*) hppfs_iget() should perhaps subsume init_inode() and hppfs_read_inode().

    (*) It would appear that all hppfs inodes are the same inode because iget()
    was being called with inode number 0, which forms the lookup key.

    Signed-off-by: David Howells
    Acked-by: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     

13 Feb, 2007

2 commits

  • This patch is inspired by Arjan's "Patch series to mark struct
    file_operations and struct inode_operations const".

    Compile tested with gcc & sparse.

    Signed-off-by: Josef 'Jeff' Sipek
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Josef 'Jeff' Sipek
     
  • Many struct inode_operations in the kernel can be "const". Marking them const
    moves these to the .rodata section, which avoids false sharing with potential
    dirty data. In addition it'll catch accidental writes at compile time to
    these shared resources.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

09 Dec, 2006

1 commit


10 Oct, 2006

1 commit


27 Sep, 2006

1 commit

  • This eliminates the i_blksize field from struct inode. Filesystems that want
    to provide a per-inode st_blksize can do so by providing their own getattr
    routine instead of using the generic_fillattr() function.

    Note that some filesystems were providing pretty much random (and incorrect)
    values for i_blksize.

    [bunk@stusta.de: cleanup]
    [akpm@osdl.org: generic_fillattr() fix]
    Signed-off-by: "Theodore Ts'o"
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Theodore Ts'o
     

23 Jun, 2006

2 commits

  • Give the statfs superblock operation a dentry pointer rather than a superblock
    pointer.

    This complements the get_sb() patch. That reduced the significance of
    sb->s_root, allowing NFS to place a fake root there. However, NFS does
    require a dentry to use as a target for the statfs operation. This permits
    the root in the vfsmount to be used instead.

    linux/mount.h has been added where necessary to make allyesconfig build
    successfully.

    Interest has also been expressed for use with the FUSE and XFS filesystems.

    Signed-off-by: David Howells
    Acked-by: Al Viro
    Cc: Nathan Scott
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     
  • Extend the get_sb() filesystem operation to take an extra argument that
    permits the VFS to pass in the target vfsmount that defines the mountpoint.

    The filesystem is then required to manually set the superblock and root dentry
    pointers. For most filesystems, this should be done with simple_set_mnt()
    which will set the superblock pointer and then set the root dentry to the
    superblock's s_root (as per the old default behaviour).

    The get_sb() op now returns an integer as there's now no need to return the
    superblock pointer.

    This patch permits a superblock to be implicitly shared amongst several mount
    points, such as can be done with NFS to avoid potential inode aliasing. In
    such a case, simple_set_mnt() would not be called, and instead the mnt_root
    and mnt_sb would be set directly.

    The patch also makes the following changes:

    (*) the get_sb_*() convenience functions in the core kernel now take a vfsmount
    pointer argument and return an integer, so most filesystems have to change
    very little.

    (*) If one of the convenience function is not used, then get_sb() should
    normally call simple_set_mnt() to instantiate the vfsmount. This will
    always return 0, and so can be tail-called from get_sb().

    (*) generic_shutdown_super() now calls shrink_dcache_sb() to clean up the
    dcache upon superblock destruction rather than shrink_dcache_anon().

    This is required because the superblock may now have multiple trees that
    aren't actually bound to s_root, but that still need to be cleaned up. The
    currently called functions assume that the whole tree is rooted at s_root,
    and that anonymous dentries are not the roots of trees which results in
    dentries being left unculled.

    However, with the way NFS superblock sharing are currently set to be
    implemented, these assumptions are violated: the root of the filesystem is
    simply a dummy dentry and inode (the real inode for '/' may well be
    inaccessible), and all the vfsmounts are rooted on anonymous[*] dentries
    with child trees.

    [*] Anonymous until discovered from another tree.

    (*) The documentation has been adjusted, including the additional bit of
    changing ext2_* into foo_* in the documentation.

    [akpm@osdl.org: convert ipath_fs, do other stuff]
    Signed-off-by: David Howells
    Acked-by: Al Viro
    Cc: Nathan Scott
    Cc: Roland Dreier
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    David Howells
     

01 Apr, 2006

1 commit


29 Mar, 2006

1 commit

  • This is a conversion to make the various file_operations structs in fs/
    const. Basically a regexp job, with a few manual fixups

    The goal is both to increase correctness (harder to accidentally write to
    shared datastructures) and reducing the false sharing of cachelines with
    things that get dirty in .data (while .rodata is nicely read only and thus
    cache clean)

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Arjan van de Ven
     

10 Jan, 2006

1 commit


27 Aug, 2005

2 commits


15 Jul, 2005

1 commit


08 Jul, 2005

1 commit

  • Some time ago a trivial patch broke HPPFS (one var became a pointer, not
    all uses were updated). It wasn't fixed at that time because not very
    used, now it's been requested so I've fixed this, and it has been tested
    positively (at least partially).

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Cc: Jeff Dike
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     

17 Apr, 2005

1 commit

  • Initial git repository build. I'm not bothering with the full history,
    even though we have it. We can create a separate "historical" git
    archive of that later if we want to, and in the meantime it's about
    3.2GB when imported into git - space that would just make the early
    git days unnecessarily complicated, when we don't have a lot of good
    infrastructure for it.

    Let it rip!

    Linus Torvalds