1. 15 2月, 2008 5 次提交
  2. 09 2月, 2008 1 次提交
  3. 07 2月, 2008 1 次提交
    • J
      inotify: send IN_ATTRIB events when link count changes · ece95912
      Jan Kara 提交于
      Currently, no notification event has been sent when inode's link count
      changed.  This is inconvenient for the application in some cases:
      
      Suppose you have the following directory structure
      
          foo/test
          bar/
      
      and you watch test.  If someone does "mv foo/test bar/", you get event
      IN_MOVE_SELF and you know something has happened with the file "test".
      However if someone does "ln foo/test bar/test" and "rm foo/test" you get no
      inotify event for the file "test" (only directories "foo" and "bar" receive
      events).
      
      Furthermore it could be argued that link count belongs to file's metadata and
      thus IN_ATTRIB should be sent when it changes.
      
      The following patch implements sending of IN_ATTRIB inotify events when link
      count of the inode changes, i.e., when a hardlink to the inode is created or
      when it is removed.  This event is sent in addition to all the events sent so
      far.  In particular, when a last link to a file is removed, IN_ATTRIB event is
      sent in addition to IN_DELETE_SELF event.
      Signed-off-by: NJan Kara <jack@suse.cz>
      Acked-by: NMorten Welinder <mwelinder@gmail.com>
      Cc: Robert Love <rlove@google.com>
      Cc: John McCutchan <ttb@tentacle.dhs.org>
      Cc: Steven French <sfrench@us.ibm.com>
      Cc: Kamalesh Babulal <kamalesh@linux.vnet.ibm.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      ece95912
  4. 13 1月, 2008 1 次提交
  5. 21 10月, 2007 1 次提交
  6. 19 10月, 2007 1 次提交
  7. 17 10月, 2007 6 次提交
  8. 20 7月, 2007 3 次提交
  9. 18 7月, 2007 1 次提交
    • S
      Introduce is_owner_or_cap() to wrap CAP_FOWNER use with fsuid check · 3bd858ab
      Satyam Sharma 提交于
      Introduce is_owner_or_cap() macro in fs.h, and convert over relevant
      users to it. This is done because we want to avoid bugs in the future
      where we check for only effective fsuid of the current task against a
      file's owning uid, without simultaneously checking for CAP_FOWNER as
      well, thus violating its semantics.
      [ XFS uses special macros and structures, and in general looked ...
      untouchable, so we leave it alone -- but it has been looked over. ]
      
      The (current->fsuid != inode->i_uid) check in generic_permission() and
      exec_permission_lite() is left alone, because those operations are
      covered by CAP_DAC_OVERRIDE and CAP_DAC_READ_SEARCH. Similarly operations
      falling under the purview of CAP_CHOWN and CAP_LEASE are also left alone.
      Signed-off-by: NSatyam Sharma <ssatyam@cse.iitk.ac.in>
      Cc: Al Viro <viro@ftp.linux.org.uk>
      Acked-by: NSerge E. Hallyn <serge@hallyn.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      3bd858ab
  10. 11 5月, 2007 1 次提交
  11. 10 5月, 2007 2 次提交
  12. 09 5月, 2007 2 次提交
  13. 08 5月, 2007 1 次提交
  14. 28 4月, 2007 1 次提交
  15. 17 2月, 2007 1 次提交
  16. 13 2月, 2007 1 次提交
  17. 09 12月, 2006 2 次提交
  18. 08 12月, 2006 2 次提交
  19. 01 10月, 2006 2 次提交
  20. 30 9月, 2006 1 次提交
  21. 27 9月, 2006 1 次提交
    • I
      [PATCH] autofs4 needs to force fail return revalidate · bcdc5e01
      Ian Kent 提交于
      For a long time now I have had a problem with not being able to return a
      lookup failure on an existsing directory.  In autofs this corresponds to a
      mount failure on a autofs managed mount entry that is browsable (and so the
      mount point directory exists).
      
      While this problem has been present for a long time I've avoided resolving
      it because it was not very visible.  But now that autofs v5 has "mount and
      expire on demand" of nested multiple mounts, such as is found when mounting
      an export list from a server, solving the problem cannot be avoided any
      longer.
      
      I've tried very hard to find a way to do this entirely within the autofs4
      module but have not been able to find a satisfactory way to achieve it.
      
      So, I need to propose a change to the VFS.
      Signed-off-by: NIan Kent <raven@themaw.net>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
      bcdc5e01
  22. 25 9月, 2006 1 次提交
  23. 25 8月, 2006 2 次提交
    • T
      VFS: Fix access("file", X_OK) in the presence of ACLs · a343bb77
      Trond Myklebust 提交于
      Currently, the access() call will return incorrect information on NFS if
      there exists an ACL that grants execute access to the user on a regular
      file. The reason the information is incorrect is that the VFS overrides
      this execute access in open_exec() by checking (inode->i_mode & 0111).
      
      This patch propagates the VFS execute bit check back into the generic
      permission() call.
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      (cherry picked from 64cbae98848c4c99851cb0a405f0b4982cd76c1e commit)
      a343bb77
    • A
      VFS: add lookup hint for network file systems · a634904a
      ASANO Masahiro 提交于
      I'm trying to speeding up mkdir(2) for network file systems.  A typical
      mkdir(2) calls two inode_operations: lookup and mkdir.  The lookup
      operation would fail with ENOENT in common case.  I think it is unnecessary
      because the subsequent mkdir operation can check it.  In case of creat(2),
      lookup operation is called with the LOOKUP_CREATE flag, so individual
      filesystem can omit real lookup.  e.g.  nfs_lookup().
      
      Here is a sample patch which uses LOOKUP_CREATE and O_EXCL on mkdir,
      symlink and mknod.  This uses the gadget for creat(2).
      
      And here is the result of a benchmark on NFSv3.
        mkdir(2) 10,000 times:
          original  50.5 sec
          patched   29.0 sec
      Signed-off-by: NASANO Masahiro <masano@tnes.nec.co.jp>
      Signed-off-by: NAndrew Morton <akpm@osdl.org>
      Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com>
      (cherry picked from fab7bf44449b29f9d5572a5dd8adcf7c91d5bf0f commit)
      a634904a