1. 19 Apr, 2008 1 commit
  2. 15 Feb, 2008 2 commits
  3. 01 Feb, 2008 12 commits
  4. 09 Oct, 2007 8 commits
    • Pavel Emelyanov's avatar
      Cleanup macros for distinguishing mandatory locks · a16877ca
      Pavel Emelyanov authored
      
      The combination of S_ISGID bit set and S_IXGRP bit unset is used to mark the
      inode as "mandatory lockable" and there's a macro for this check called
      MANDATORY_LOCK(inode).  However, fs/locks.c and some filesystems still perform
      the explicit i_mode checking.  Besides, Andrew pointed out, that this macro is
      buggy itself, as it dereferences the inode arg twice.
      
      Convert this macro into static inline function and switch its users to it,
      making the code shorter and more readable.
      
      The __mandatory_lock() helper is to be used in places where the IS_MANDLOCK()
      for superblock is already known to be true.
      Signed-off-by: default avatarPavel Emelyanov <xemul@openvz.org>
      Cc: Trond Myklebust <trond.myklebust@fys.uio.no>
      Cc: "J. Bruce Fields" <bfields@fieldses.org>
      Cc: David Howells <dhowells@redhat.com>
      Cc: Eric Van Hensbergen <ericvh@gmail.com>
      Cc: Ron Minnich <rminnich@sandia.gov>
      Cc: Latchesar Ionkov <lucho@ionkov.net>
      Cc: Steven Whitehouse <swhiteho@redhat.com>
      Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
      a16877ca
    • J. Bruce Fields's avatar
      knfsd: nfsv4 delegation recall should take reference on client · cfdcad4d
      J. Bruce Fields authored
      
      It's not enough to take a reference on the delegation object itself; we
      need to ensure that the rpc_client won't go away just as we're about to
      make an rpc call.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      cfdcad4d
    • J. Bruce Fields's avatar
      knfsd: don't shutdown callbacks until nfsv4 client is freed · 1b1a9b31
      J. Bruce Fields authored
      
      If a callback still holds a reference on the client, then it may be
      about to perform an rpc call, so it isn't safe to call rpc_shutdown().
      (Though rpc_shutdown() does wait for any outstanding rpc's, it can't
      know if a new rpc is about to be issued with that client.)
      
      So, wait to shutdown the rpc_client until the reference count on the
      client has gone to zero.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      1b1a9b31
    • J. Bruce Fields's avatar
      knfsd: let nfsd manage timing out its own leases · 0272e1fd
      J. Bruce Fields authored
      
      Currently there's a race that can cause an oops in generic_setlease.
      
      (In detail: nfsd, when it removes a lease, does so by calling
      vfs_setlease() with F_UNLCK and a pointer to the fl_flock field, which
      in turn points to nfsd's existing lease; but the first thing the
      setlease code does is call time_out_leases().  If the lease happens to
      already be beyond the lease break time, that will free the lease and (in
      nfsd's release_private callback) set fl_flock to NULL, leading to a NULL
      deference soon after in vfs_setlease().)
      
      There are probably other things to fix here too, but it seems inherently
      racy to allow either locks.c or nfsd to time out this lease.  Instead
      just set the fl_break_time to 0 (preventing locks.c from ever timing out
      this lock) and leave it up to nfsd's laundromat thread to deal with it.
      Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
      0272e1fd
    • J. Bruce Fields's avatar
      knfsd: remove code duplication in nfsd4_setclientid() · c175b83c
      J. Bruce Fields authored
      
      Each branch of this if-then-else has a bunch of duplicated code that we
      could just put at the end.
      Signed-off-by: default avatar"J. Bruce Fields" <bfields@citi.umich.edu>
      Acked-by: default avatarNeil Brown <neilb@suse.de>
      c175b83c
    • J. Bruce Fields's avatar
      knfsd: move nfsv4 slab creation/destruction to module init/exit · e8ff2a84
      J. Bruce Fields authored
      
      We have some slabs that the nfs4 server uses to store state objects.
      We're currently creating and destroying those slabs whenever the server
      is brought up or down.  That seems excessive; may as well just do that
      in module initialization and exit.
      
      Also add some minor header cleanup.  (Thanks to Andrew Morton for that
      and a compile fix.)
      Signed-off-by: default avatar"J. Bruce Fields" <bfields@citi.umich.edu>
      Acked-by: default avatarNeil Brown <neilb@suse.de>
      e8ff2a84
    • J. Bruce Fields's avatar
      knfsd: demote some printk()s to dprintk()s · 2fdada03
      J. Bruce Fields authored
      
      To quote a recent mail from Andrew Morton:
      
      	Look: if there's a way in which an unprivileged user can trigger
      	a printk we fix it, end of story.
      
      OK.  I assume that goes double for printk()s that might be triggered by
      random hosts on the internet.  So, disable some printk()s that look like
      they could be triggered by malfunctioning or malicious clients.  For
      now, just downgrade them to dprintk()s.
      Signed-off-by: default avatar"J. Bruce Fields" <bfields@citi.umich.edu>
      Acked-by: default avatarNeil Brown <neilb@suse.de>
      2fdada03
    • J. Bruce Fields's avatar
      knfsd: cleanup of nfsd4 cmp_* functions · 599e0a22
      J. Bruce Fields authored
      
      Benny Halevy suggested renaming cmp_* to same_* to make the meaning of
      the return value clearer.
      
      Fix some nearby style deviations while we're at it, including a small
      swath of creative indentation in nfs4_preprocess_seqid_op().
      Signed-off-by: default avatar"J. Bruce Fields" <bfields@citi.umich.edu>
      Acked-by: default avatarNeil Brown <neilb@suse.de>
      599e0a22
  5. 19 Jul, 2007 1 commit
    • Paul Mundt's avatar
      mm: Remove slab destructors from kmem_cache_create(). · 20c2df83
      Paul Mundt authored
      Slab destructors were no longer supported after Christoph's
      c59def9f
      
       change. They've been
      BUGs for both slab and slub, and slob never supported them
      either.
      
      This rips out support for the dtor pointer from kmem_cache_create()
      completely and fixes up every single callsite in the kernel (there were
      about 224, not including the slab allocator definitions themselves,
      or the documentation references).
      Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
      20c2df83
  6. 18 Jul, 2007 1 commit
    • J. Bruce Fields's avatar
      locks: rename lease functions to reflect locks.c conventions · a9933cea
      J. Bruce Fields authored
      
      We've been using the convention that vfs_foo is the function that calls
      a filesystem-specific foo method if it exists, or falls back on a
      generic method if it doesn't; thus vfs_foo is what is called when some
      other part of the kernel (normally lockd or nfsd) wants to get a lock,
      whereas foo is what filesystems call to use the underlying local
      functionality as part of their lock implementation.
      
      So rename setlease to vfs_setlease (which will call a
      filesystem-specific setlease after a later patch) and __setlease to
      setlease.
      
      Also, vfs_setlease need only be GPL-exported as long as it's only needed
      by lockd and nfsd.
      Signed-off-by: default avatar"J. Bruce Fields" <bfields@citi.umich.edu>
      a9933cea
  7. 17 Jul, 2007 3 commits
  8. 10 Jul, 2007 1 commit
  9. 09 May, 2007 1 commit
  10. 06 May, 2007 3 commits
  11. 27 Mar, 2007 2 commits
  12. 12 Feb, 2007 1 commit
  13. 13 Dec, 2006 4 commits