30 Aug, 2005

2 commits


27 Aug, 2005

5 commits

  • The problem arises if an entity in sysfs is created and removed without
    ever having been made completely visible. In SCSI this is triggered by
    removing a device while it's initialising.

    The problem appears to be that because it was never made visible in sysfs,
    the sysfs dentry has a null d_inode which oopses when a reference is made
    to it. The solution is simply to check d_inode and assume the object was
    never made visible (and thus doesn't need deleting) if it's NULL.

    (akpm: possibly a stopgap for 2.6.13 scsi problems. May not be the
    long-term fix)

    Signed-off-by: James Bottomley
    Cc: Greg KH
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    James Bottomley
     
  • The recent change to locks_remove_flock code in fs/locks.c changes how
    byte range locks are removed from closing files, which shows up a bug in
    cifs.

    The assumption in the cifs code was that the close call sent to the
    server would remove any pending locks on the server on this file, but
    that is no longer safe as the fs/locks.c code on the client wants unlock
    of 0 to PATH_MAX to remove all locks (at least from this client, it is
    not possible AFAIK to remove all locks from other clients made to the
    server copy of the file).

    Note that cifs locks are different from posix locks - and it is not
    possible to map posix locks perfectly on the wire yet, due to
    restrictions of the cifs network protocol, even to Samba without adding
    a new request type to the network protocol (which we plan to do for
    Samba 3.0.21 within a few months), but the local client will have the
    correct, posix view, of the lock in most cases.

    The correct fix for cifs for this would involve a bigger change than I
    would like to do this late in the 2.6.13-rc cycle - and would involve
    cifs keeping track of all unmerged (uncoalesced) byte range locks for
    each remote inode and scanning that list to remove locks that intersect
    or fall wholly within the range - locks that intersect may have to be
    reaquired with the smaller, remaining range.

    Signed-off-by: Steve French
    Signed-off-by: Dave Kleikamp
    Signed-off-by: Linus Torvalds

    Steve French
     
  • While touching this code I noticed the error handling is bogus, so I
    fixed it up.

    I've removed the IS_ERR(proc_dentry) check, which will never trigger and
    is clearly a typo: we must check proc_file instead.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     
  • Update hppfs for the symlink functions prototype change.

    Yes, I know the code I leave there is still _bogus_, see next patch for
    this.

    Signed-off-by: Paolo 'Blaisorblade' Giarrusso
    Signed-off-by: Linus Torvalds

    Paolo 'Blaisorblade' Giarrusso
     
  • There is an off by one problem with idr_get_new_above.

    The comment and function name suggest that it will return an id >
    starting_id, but it actually returned an id >= starting_id, and kernel
    callers other than inotify treated it as such.

    The patch below fixes the comment, and fixes inotifys usage. The
    function name still doesn't match the behaviour, but it never did.

    Signed-off-by: John McCutchan
    Signed-off-by: Linus Torvalds

    John McCutchan
     

21 Aug, 2005

4 commits


20 Aug, 2005

4 commits

  • Added missing unlock_kernel() to NFSv4 atomic lookup.

    Signed-off-by: Steve Dickson
    Signed-off-by: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Steve Dickson
     
  • This fixes up the symlink functions for the calling convention change:

    * afs, autofs4, befs, devfs, freevxfs, jffs2, jfs, ncpfs, procfs,
    smbfs, sysvfs, ufs, xfs - prototype change for ->follow_link()
    * befs, smbfs, xfs - same for ->put_link()

    Signed-off-by: Linus Torvalds

    Al Viro
     
  • This bug could cause oopses and page state corruption, because ncpfs
    used the generic page-cache symlink handlign functions. But those
    functions only work if the page cache is guaranteed to be "stable", ie a
    page that was installed when the symlink walk was started has to still
    be installed in the page cache at the end of the walk.

    We could have fixed ncpfs to not use the generic helper routines, but it
    is in many ways much cleaner to instead improve on the symlink walking
    helper routines so that they don't require that absolute stability.

    We do this by allowing "follow_link()" to return a error-pointer as a
    cookie, which is fed back to the cleanup "put_link()" routine. This
    also simplifies NFS symlink handling.

    Signed-off-by: Linus Torvalds

    Linus Torvalds
     
  • The current calling conventions for ->follow_link() are already fairly
    complex.

    What we have is
    1) you can return -error; then you must release nameidata yourself
    and ->put_link() will _not_ be called.
    2) you can do nd_set_link(nd, ERR_PTR(-error)) and return 0
    3) you can do nd_set_link(nd, path) and return 0
    4) you can return 0 (after having moved nameidata yourself)

    jffs2 follow_link() is broken - it has an exit where it returns
    -EIO and leaks nameidata.

    Signed-off-by: Linus Torvalds

    Al Viro
     

19 Aug, 2005

4 commits

  • When i_acl_default is set to some error we do not hold the lock (hence we
    are not allowed to drop it and reacquire later).

    Signed-off-by: Jan Kara
    Cc: Jeff Mahoney
    Cc: Chris Mason
    Cc:
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Jan Kara
     
  • Down the road we want to eliminate the use of the global kernel lock entirely
    from the NFS client. To do this, we need to protect the fields in the
    nfs_inode structure adequately. Start by serializing updates to the
    "cache_validity" field.

    Note this change addresses an SMP hang found by njw@osdl.org, where processes
    deadlock because nfs_end_data_update and nfs_revalidate_mapping update the
    "cache_validity" field without proper serialization.

    Test plan:
    Millions of fsx ops on SMP clients. Run Nick Wilson's breaknfs program on
    large SMP clients.

    Signed-off-by: Chuck Lever
    Cc: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chuck Lever
     
  • Introduce atomic bitops to manipulate the bits in the nfs_inode structure's
    "flags" field.

    Using bitops means we can use a generic wait_on_bit call instead of an ad hoc
    locking scheme in fs/nfs/inode.c, so we can remove the "nfs_i_wait" field from
    nfs_inode at the same time.

    The other new flags field will continue to use bitmask and logic AND and OR.
    This permits several flags to be set at the same time efficiently. The
    following patch adds a spin lock to protect these flags, and this spin lock
    will later cover other fields in the nfs_inode structure, amortizing the cost
    of using this type of serialization.

    Test plan:
    Millions of fsx ops on SMP clients.

    Signed-off-by: Chuck Lever
    Cc: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chuck Lever
     
  • Certain bits in nfsi->flags can be manipulated with atomic bitops, and some
    are better manipulated via logical bitmask operations.

    This patch splits the flags field into two. The next patch introduces atomic
    bitops for one of the fields.

    Test plan:
    Millions of fsx ops on SMP clients.

    Signed-off-by: Chuck Lever
    Cc: Trond Myklebust
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Chuck Lever
     

18 Aug, 2005

2 commits


17 Aug, 2005

4 commits


16 Aug, 2005

4 commits


15 Aug, 2005

2 commits


14 Aug, 2005

1 commit


11 Aug, 2005

2 commits


09 Aug, 2005

1 commit

  • The patch below unhooks fsnotify from vfs_unlink & vfs_rmdir. It
    introduces two new fsnotify calls, that are hooked in at the dcache
    level. This not only more closely matches how the VFS layer works, it
    also avoids the problem with locking and inode lifetimes.

    The two functions are

    - fsnotify_nameremove -- called when a directory entry is going away.
    It notifies the PARENT of the deletion. This is called from
    d_delete().

    - inoderemove -- called when the files inode itself is going away. It
    notifies the inode that is being deleted. This is called from
    dentry_iput().

    Signed-off-by: John McCutchan
    Signed-off-by: Linus Torvalds

    John McCutchan
     

08 Aug, 2005

2 commits

  • I'm resending this patch, because I still believe it's the correct fix.

    Tested before/after applying the patch with a test application
    available from:

    http://www.inf.bme.hu/~mszeredi/nstest.c

    Bind mount from a foreign namespace results in an un-removable mount.
    The reason is that mnt->mnt_namespace is copied from the old mount in
    clone_mnt(). Because of this check_mnt() in sys_umount() will fail.

    The solution is to set mnt->mnt_namespace to current->namespace in
    clone_mnt(). clone_mnt() is either called from do_loopback() or
    copy_tree(). copy_tree() is called from do_loopback() or
    copy_namespace().

    When called (directly or indirectly) from do_loopback(), always
    current->namspace is being modified: check_mnt(nd->mnt). So setting
    mnt->mnt_namespace to current->namspace is the right thing to do.

    When called from copy_namespace(), the setting of mnt_namespace is
    irrelevant, since mnt_namespace is reset later in that function for
    all copied mounts.

    Jamie said:

    This patch is correct. The old code was buggy for more fundamental and
    serious reason: it broke the invariant that a tree of vfsmnts all have the
    same value of mnt_namespace (and the same for the mnt_list list).

    Signed-off-by: Miklos Szeredi
    Acked-by: Jamie Lokier
    Cc:
    Cc: Christoph Hellwig
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Miklos Szeredi
     
  • Remove a very wrong comment.

    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Andrew Morton
     

07 Aug, 2005

1 commit


05 Aug, 2005

2 commits