1. 24 4月, 2011 1 次提交
    • L
      vfs: get rid of 'struct dcache_hash_bucket' abstraction · b07ad996
      Linus Torvalds 提交于
      It's a useless abstraction for 'hlist_bl_head', and it doesn't actually
      help anything - quite the reverse.  All the users end up having to know
      about the hlist_bl_head details anyway, using 'struct hlist_bl_node *'
      etc. So it just makes the code look confusing.
      
      And the cost of it is extra '&b->head' syntactic noise, but more
      importantly it spuriously makes the hash table dentry list look
      different from the per-superblock DCACHE_DISCONNECTED dentry list.
      
      As a result, the code ended up using ad-hoc locking for one case and
      special helper functions for what is really another totally identical
      case in the very same function.
      
      Make it all look and work the same.
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      b07ad996
  2. 23 4月, 2011 5 次提交
  3. 22 4月, 2011 15 次提交
  4. 21 4月, 2011 18 次提交
  5. 20 4月, 2011 1 次提交
    • S
      Open with O_CREAT flag set fails to open existing files on non writable directories · 1574dff8
      Sachin Prabhu 提交于
      An open on a NFS4 share using the O_CREAT flag on an existing file for
      which we have permissions to open but contained in a directory with no
      write permissions will fail with EACCES.
      
      A tcpdump shows that the client had set the open mode to UNCHECKED which
      indicates that the file should be created if it doesn't exist and
      encountering an existing flag is not an error. Since in this case the
      file exists and can be opened by the user, the NFS server is wrong in
      attempting to check create permissions on the parent directory.
      
      The patch adds a conditional statement to check for create permissions
      only if the file doesn't exist.
      Signed-off-by: NSachin S. Prabhu <sprabhu@redhat.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      1574dff8