1. 02 Aug, 2010 1 commit
    • Eric Paris's avatar
      vfs: re-introduce MAY_CHDIR · 9cfcac81
      Eric Paris authored
      Currently MAY_ACCESS means that filesystems must check the permissions
      right then and not rely on cached results or the results of future
      operations on the object.  This can be because of a call to sys_access() or
      because of a call to chdir() which needs to check search without relying on
      any future operations inside that dir.  I plan to use MAY_ACCESS for other
      purposes in the security system, so I split the MAY_ACCESS and the
      MAY_CHDIR cases.
      Signed-off-by: default avatarEric Paris <eparis@redhat.com>
      Acked-by: default avatarStephen D. Smalley <sds@tycho.nsa.gov>
      Signed-off-by: default avatarJames Morris <jmorris@namei.org>
  2. 19 Jul, 2010 1 commit
    • Dave Chinner's avatar
      mm: add context argument to shrinker callback · 7f8275d0
      Dave Chinner authored
      The current shrinker implementation requires the registered callback
      to have global state to work from. This makes it difficult to shrink
      caches that are not global (e.g. per-filesystem caches). Pass the shrinker
      structure to the callback so that users can embed the shrinker structure
      in the context the shrinker needs to operate on and get back to it in the
      callback via container_of().
      Signed-off-by: default avatarDave Chinner <dchinner@redhat.com>
      Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
  3. 28 May, 2010 1 commit
  4. 26 May, 2010 1 commit
  5. 14 May, 2010 5 commits
  6. 29 Apr, 2010 1 commit
  7. 22 Apr, 2010 1 commit
  8. 09 Apr, 2010 1 commit
  9. 10 Mar, 2010 1 commit
  10. 05 Mar, 2010 1 commit
  11. 06 Jan, 2010 1 commit
  12. 03 Dec, 2009 4 commits
  13. 26 Oct, 2009 1 commit
  14. 21 Jul, 2009 1 commit
    • Trond Myklebust's avatar
      NFSv4: Fix a problem whereby a buggy server can oops the kernel · d953126a
      Trond Myklebust authored
      We just had a case in which a buggy server occasionally returns the wrong
      attributes during an OPEN call. While the client does catch this sort of
      condition in nfs4_open_done(), and causes the nfs4_atomic_open() to return
      -EISDIR, the logic in nfs_atomic_lookup() is broken, since it causes a
      fallback to an ordinary lookup instead of just returning the error.
      When the buggy server then returns a regular file for the fallback lookup,
      the VFS allows the open, and bad things start to happen, since the open
      file doesn't have any associated NFSv4 state.
      The fix is firstly to return the EISDIR/ENOTDIR errors immediately, and
      secondly to ensure that we are always careful when dereferencing the
      nfs_open_context state pointer.
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
  15. 12 Jul, 2009 1 commit
  16. 19 May, 2009 1 commit
  17. 27 Mar, 2009 1 commit
  18. 19 Mar, 2009 1 commit
  19. 11 Mar, 2009 1 commit
    • Suresh Jayaraman's avatar
      NFS: Handle -ESTALE error in access() · a71ee337
      Suresh Jayaraman authored
      Hi Trond,
      I have been looking at a bugreport where trying to open applications on KDE
      on a NFS mounted home fails temporarily. There have been multiple reports on
      different kernel versions pointing to this common issue:
      This issue can be reproducible consistently by doing this on a NFS mounted
      home (KDE):
      1. Open 2 xterm sessions
      2. From one of the xterm session, do "ssh -X <remote host>"
      3. "stat ~/.Xauthority" on the remote SSH session
      4. Close the two xterm sessions
      5. On the server do a "stat ~/.Xauthority"
      6. Now on the client, try to open xterm
      This will fail.
      Even if the filehandle had become stale, the NFS client should invalidate
      the cache/inode and should repeat LOOKUP. Looking at the packet capture when
      the failure occurs shows that there were two subsequent ACCESS() calls with
      the same filehandle and both fails with -ESTALE error.
      I have tested the fix below. Now the client issue a LOOKUP after the
      ACCESS() call fails with -ESTALE. If all this makes sense to you, can you
      consider this for inclusion?
      If the server returns an -ESTALE error due to stale filehandle in response to
      an ACCESS() call, we need to invalidate the cache and inode so that LOOKUP()
      can be retried. Without this change, the nfs client retries ACCESS() with the
      same filehandle, fails again and could lead to temporary failure of
      applications running on nfs mounted home.
      Signed-off-by: default avatarSuresh Jayaraman <sjayaraman@suse.de>
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
  20. 23 Dec, 2008 4 commits
  21. 23 Oct, 2008 2 commits
    • Miklos Szeredi's avatar
      [PATCH] move executable checking into ->permission() · f696a365
      Miklos Szeredi authored
      For execute permission on a regular files we need to check if file has
      any execute bits at all, regardless of capabilites.
      This check is normally performed by generic_permission() but was also
      added to the case when the filesystem defines its own ->permission()
      method.  In the latter case the filesystem should be responsible for
      performing this check.
      Move the check from inode_permission() inside filesystems which are
      not calling generic_permission().
      Create a helper function execute_ok() that returns true if the inode
      is a directory or if any execute bits are present in i_mode.
      Also fix up the following code:
       - coda control file is never executable
       - sysctl files are never executable
       - hfs_permission seems broken on MAY_EXEC, remove
       - hfsplus_permission is eqivalent to generic_permission(), remove
      Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
    • Al Viro's avatar
      [PATCH] make O_EXCL in nd->intent.flags visible in nd->flags · 3516586a
      Al Viro authored
      New flag: LOOKUP_EXCL.  Set before doing the final step of pathname
      resolution on the paths that have LOOKUP_CREATE and O_EXCL.
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
  22. 20 Oct, 2008 1 commit
    • Rik van Riel's avatar
      vmscan: split LRU lists into anon & file sets · 4f98a2fe
      Rik van Riel authored
      Split the LRU lists in two, one set for pages that are backed by real file
      systems ("file") and one for pages that are backed by memory and swap
      ("anon").  The latter includes tmpfs.
      The advantage of doing this is that the VM will not have to scan over lots
      of anonymous pages (which we generally do not want to swap out), just to
      find the page cache pages that it should evict.
      This patch has the infrastructure and a basic policy to balance how much
      we scan the anon lists and how much we scan the file lists.  The big
      policy changes are in separate patches.
      [lee.schermerhorn@hp.com: collect lru meminfo statistics from correct offset]
      [kosaki.motohiro@jp.fujitsu.com: prevent incorrect oom under split_lru]
      [kosaki.motohiro@jp.fujitsu.com: fix pagevec_move_tail() doesn't treat unevictable page]
      [hugh@veritas.com: memcg swapbacked pages active]
      [hugh@veritas.com: splitlru: BDI_CAP_SWAP_BACKED]
      [akpm@linux-foundation.org: fix /proc/vmstat units]
      [nishimura@mxp.nes.nec.co.jp: memcg: fix handling of shmem migration]
      [kosaki.motohiro@jp.fujitsu.com: adjust Quicklists field of /proc/meminfo]
      [kosaki.motohiro@jp.fujitsu.com: fix style issue of get_scan_ratio()]
      Signed-off-by: default avatarRik van Riel <riel@redhat.com>
      Signed-off-by: default avatarLee Schermerhorn <Lee.Schermerhorn@hp.com>
      Signed-off-by: default avatarKOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
      Signed-off-by: default avatarHugh Dickins <hugh@veritas.com>
      Signed-off-by: default avatarDaisuke Nishimura <nishimura@mxp.nes.nec.co.jp>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
  23. 14 Oct, 2008 2 commits
  24. 07 Oct, 2008 1 commit
    • Trond Myklebust's avatar
      NFS: Add options for finer control of the lookup cache · 4eec952e
      Trond Myklebust authored
      Add the flag NFS_MOUNT_LOOKUP_CACHE_NONEG to turn off the caching of
      negative dentries. In reality what we do is to force
      nfs_lookup_revalidate() to always discard negative dentries.
      Add the flag NFS_MOUNT_LOOKUP_CACHE_NONE for enforcing stricter
      revalidation of dentries. It forces the revalidate code to always do a
      lookup instead of just checking the cached mtime of the parent directory.
      Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
  25. 27 Jul, 2008 1 commit
    • Al Viro's avatar
      [PATCH] sanitize ->permission() prototype · e6305c43
      Al Viro authored
      * kill nameidata * argument; map the 3 bits in ->flags anybody cares
        about to new MAY_... ones and pass with the mask.
      * kill redundant gfs2_iop_permission()
      * sanitize ecryptfs_permission()
      * fix remaining places where ->permission() instances might barf on new
        MAY_... found in mask.
      The obvious next target in that direction is permission(9)
      folded fix for nfs_permission() breakage from Miklos Szeredi <mszeredi@suse.cz>
      Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
  26. 15 Jul, 2008 3 commits