1. 03 2月, 2015 1 次提交
  2. 22 1月, 2015 1 次提交
  3. 17 1月, 2015 10 次提交
  4. 13 1月, 2015 1 次提交
  5. 08 10月, 2014 12 次提交
  6. 10 9月, 2014 6 次提交
  7. 22 8月, 2014 1 次提交
  8. 14 8月, 2014 3 次提交
    • J
      locks: move locks_free_lock calls in do_fcntl_add_lease outside spinlock · 2dfb928f
      Jeff Layton 提交于
      There's no need to call locks_free_lock here while still holding the
      i_lock. Defer that until the lock has been dropped.
      Acked-by: NJ. Bruce Fields <bfields@fieldses.org>
      Signed-off-by: NJeff Layton <jlayton@primarydata.com>
      2dfb928f
    • J
      locks: defer freeing locks in locks_delete_lock until after i_lock has been dropped · ed9814d8
      Jeff Layton 提交于
      In commit 72f98e72 (locks: turn lock_flocks into a spinlock), we
      moved from using the BKL to a global spinlock. With this change, we lost
      the ability to block in the fl_release_private operation.
      
      This is problematic for NFS (and probably some other filesystems as
      well). Add a new list_head argument to locks_delete_lock. If that
      argument is non-NULL, then queue any locks that we want to free to the
      list instead of freeing them.
      
      Then, add a new locks_dispose_list function that will walk such a list
      and call locks_free_lock on them after the i_lock has been dropped.
      
      Finally, change all of the callers of locks_delete_lock to pass in a
      list_head, except for lease_modify. That function can be called long
      after the i_lock has been acquired. Deferring the freeing of a lease
      after unlocking it in that function is non-trivial until we overhaul
      some of the spinlocking in the lease code.
      
      Currently though, no filesystem that sets fl_release_private supports
      leases, so this is not currently a problem. We'll eventually want to
      make the same change in the lease code, but it needs a lot more work
      before we can reasonably do so.
      Acked-by: NJ. Bruce Fields <bfields@fieldses.org>
      Signed-off-by: NJeff Layton <jlayton@primarydata.com>
      ed9814d8
    • J
      locks: don't reuse file_lock in __posix_lock_file · b84d49f9
      Jeff Layton 提交于
      Currently in the case where a new file lock completely replaces the old
      one, we end up overwriting the existing lock with the new info. This
      means that we have to call fl_release_private inside i_lock. Change the
      code to instead copy the info to new_fl, insert that lock into the
      correct spot and then delete the old lock. In a later patch, we'll defer
      the freeing of the old lock until after the i_lock has been dropped.
      Acked-by: NJ. Bruce Fields <bfields@fieldses.org>
      Signed-off-by: NJeff Layton <jlayton@primarydata.com>
      b84d49f9
  9. 12 8月, 2014 2 次提交
  10. 14 7月, 2014 1 次提交
  11. 11 6月, 2014 1 次提交
    • J
      locks: set fl_owner for leases back to current->files · 0c273629
      Jeff Layton 提交于
      This fixes a regression due to commit 130d1f95 (locks: ensure that
      fl_owner is always initialized properly in flock and lease codepaths). I
      had mistakenly thought that the fl_owner wasn't used in the lease code,
      but I missed the place in __break_lease that does use it.
      
      The i_have_this_lease check in generic_add_lease uses it. While I'm not
      sure that check is terribly helpful [1], reset it back to using
      current->files in order to ensure that there's no behavior change here.
      
      [1]: leases are owned by the file description. It's possible that this
           is a threaded program, and the lease breaker and the task that
           would handle the signal are different, even if they have the same
           file table. So, there is the potential for false positives with
           this check.
      
      Fixes: 130d1f95 (locks: ensure that fl_owner is always initialized properly in flock and lease codepaths)
      Signed-off-by: NJeff Layton <jlayton@primarydata.com>
      0c273629
  12. 02 6月, 2014 1 次提交