1. 29 6月, 2013 12 次提交
  2. 23 2月, 2013 1 次提交
  3. 27 9月, 2012 1 次提交
  4. 21 8月, 2012 1 次提交
    • J
      vfs: don't treat fl_type as a bitmap · 0ee5c6d6
      Jeff Layton 提交于
      The rules for fl_type are rather convoluted. Typically it's treated as
      holding specific values, except in the case of LOCK_MAND, in which case
      it can be or'ed with LOCK_READ|LOCK_WRITE.
      
      On some arches F_WRLCK == 2 and F_UNLCK == 3, so and'ing with F_WRLCK will also
      catch the F_UNLCK case. It's unlikely in either case here that we'd ever see
      F_UNLCK since those shouldn't end up on any lists, but it's still best to be
      consistent.
      Signed-off-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      0ee5c6d6
  5. 02 8月, 2012 1 次提交
  6. 28 7月, 2012 1 次提交
  7. 27 7月, 2012 1 次提交
  8. 24 7月, 2012 1 次提交
  9. 14 7月, 2012 1 次提交
  10. 30 5月, 2012 1 次提交
  11. 03 5月, 2012 1 次提交
  12. 02 4月, 2012 1 次提交
  13. 27 12月, 2011 1 次提交
    • L
      vfs: fix handling of lock allocation failure in lease-break case · 6d4b9e38
      Linus Torvalds 提交于
      Bruce Fields notes that commit 778fc546 ("locks: fix tracking of
      inprogress lease breaks") introduced a possible error pointer
      dereference on failure to allocate memory.  locks_conflict() will
      dereference the passed-in new lease lock structure that may be an error pointer.
      
      This means an open (without O_NONBLOCK set) on a file with a lease
      applied (generally only done when Samba or nfsd (with v4) is running)
      could crash if a kmalloc() fails.
      
      So instead of playing games with IS_ERROR() all over the place, just
      check the allocation failure early.  That makes the code more
      straightforward, and avoids this possible bad pointer dereference.
      Based-on-patch-by: NJ. Bruce Fields <bfields@redhat.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      6d4b9e38
  14. 28 9月, 2011 1 次提交
    • P
      doc: fix broken references · 395cf969
      Paul Bolle 提交于
      There are numerous broken references to Documentation files (in other
      Documentation files, in comments, etc.). These broken references are
      caused by typo's in the references, and by renames or removals of the
      Documentation files. Some broken references are simply odd.
      
      Fix these broken references, sometimes by dropping the irrelevant text
      they were part of.
      Signed-off-by: NPaul Bolle <pebolle@tiscali.nl>
      Signed-off-by: NJiri Kosina <jkosina@suse.cz>
      395cf969
  15. 21 9月, 2011 1 次提交
  16. 20 8月, 2011 4 次提交
    • J
      locks: setlease cleanup · c1f24ef4
      J. Bruce Fields 提交于
      There's an incorrect comment here.  Also clean up the logic: the
      "rdlease" and "wrlease" locals are confusingly named, and don't really
      add anything since we can make a decision as soon as we hit one of these
      cases.
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      c1f24ef4
    • J
      locks: fix tracking of inprogress lease breaks · 778fc546
      J. Bruce Fields 提交于
      We currently use a bit in fl_flags to record whether a lease is being
      broken, and set fl_type to the type (RDLCK or UNLCK) that it will
      eventually have.  This means that once the lease break starts, we forget
      what the lease's type *used* to be.  Breaking a read lease will then
      result in blocking read opens, even though there's no conflict--because
      the lease type is now F_UNLCK and we can no longer tell whether it was
      previously a read or write lease.
      
      So, instead keep fl_type as the original type (the type which we
      enforce), and keep track of whether we're unlocking or merely
      downgrading by replacing the single FL_INPROGRESS flag by
      FL_UNLOCK_PENDING and FL_DOWNGRADE_PENDING flags.
      
      To get this right we also need to track separate downgrade and break
      times, to handle the case where a write-leased file gets conflicting
      opens first for read, then later for write.
      
      (I first considered just eliminating the downgrade behavior
      completely--nfsv4 doesn't need it, and nobody as far as I can tell
      actually uses it currently--but Jeremy Allison tells me that Windows
      oplocks do behave this way, so Samba will probably use this some day.)
      Reviewed-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      778fc546
    • J
      locks: move F_INPROGRESS from fl_type to fl_flags field · 710b7216
      J. Bruce Fields 提交于
      F_INPROGRESS isn't exposed to userspace.  To me it makes more sense in
      fl_flags....
      Reviewed-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      710b7216
    • J
      locks: minor lease cleanup · ab83fa4b
      J. Bruce Fields 提交于
      Use a helper function, to simplify upcoming changes.
      Reviewed-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      ab83fa4b
  17. 21 7月, 2011 1 次提交
    • J
      locks: rename lock-manager ops · 8fb47a4f
      J. Bruce Fields 提交于
      Both the filesystem and the lock manager can associate operations with a
      lock.  Confusingly, one of them (fl_release_private) actually has the
      same name in both operation structures.
      
      It would save some confusion to give the lock-manager ops different
      names.
      Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
      8fb47a4f
  18. 16 7月, 2011 1 次提交
  19. 07 7月, 2011 1 次提交
    • M
      fs: fix lock initialization · a51cb91d
      Miklos Szeredi 提交于
      locks_alloc_lock() assumed that the allocated struct file_lock is
      already initialized to zero members.  This is only true for the first
      allocation of the structure, after reuse some of the members will have
      random values.
      
      This will for example result in passing random fl_start values to
      userspace in fuse for FL_FLOCK locks, which is an information leak at
      best.
      
      Fix by reinitializing those members which may be non-zero after freeing.
      Signed-off-by: NMiklos Szeredi <mszeredi@suse.cz>
      CC: stable@kernel.org
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      a51cb91d
  20. 08 3月, 2011 1 次提交
  21. 05 3月, 2011 1 次提交
  22. 07 1月, 2011 1 次提交
  23. 05 1月, 2011 2 次提交
  24. 18 11月, 2010 1 次提交
  25. 11 11月, 2010 1 次提交