1. 09 2月, 2010 1 次提交
  2. 21 8月, 2009 1 次提交
  3. 10 8月, 2009 1 次提交
  4. 07 1月, 2009 11 次提交
  5. 24 12月, 2008 1 次提交
  6. 25 11月, 2008 1 次提交
    • C
      NLM: client-side nlm_lookup_host() should avoid matching on srcaddr · a8d82d9b
      Chuck Lever 提交于
      Since commit c98451bd, the loop in nlm_lookup_host() unconditionally
      compares the host's h_srcaddr field to the incoming source address.
      For client-side nlm_host entries, both are always AF_UNSPEC, so this
      check is unnecessary.
      
      Since commit 781b61a6, which added support for AF_INET6 addresses to
      nlm_cmp_addr(), nlm_cmp_addr() now returns FALSE for AF_UNSPEC
      addresses, which causes nlm_lookup_host() to create a fresh nlm_host
      entry every time it is called on the client.
      
      These extra entries will eventually expire once the server is
      unmounted, so the impact of this regression, introduced with lockd
      IPv6 support in 2.6.28, should be minor.
      
      We could fix this by adding an arm in nlm_cmp_addr() for AF_UNSPEC
      addresses, but really, nlm_lookup_host() shouldn't be matching on the
      srcaddr field for client-side nlm_host lookups.
      Signed-off-by: NChuck Lever <chuck.lever@oracle.com>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      a8d82d9b
  7. 31 10月, 2008 1 次提交
  8. 30 10月, 2008 1 次提交
  9. 29 10月, 2008 1 次提交
  10. 04 10月, 2008 4 次提交
  11. 30 9月, 2008 11 次提交
  12. 24 4月, 2008 4 次提交
    • J
      lockd: convert nsm_mutex to a spinlock · d8421202
      J. Bruce Fields 提交于
      There's no reason for a mutex here, except to allow an allocation under
      the lock, which we can avoid with the usual trick of preallocating
      memory for the new object and freeing it if it turns out to be
      unnecessary.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      d8421202
    • J
      lockd: clean up __nsm_find() · a95e56e7
      J. Bruce Fields 提交于
      Use list_for_each_entry().  Also, in keeping with kernel style, make the
      normal case (kzalloc succeeds) unindented and handle the abnormal case
      with a goto.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      a95e56e7
    • J
      lockd: fix race in nlm_release() · 164f98ad
      J. Bruce Fields 提交于
      The sm_count is decremented to zero but left on the nsm_handles list.
      So in the space between decrementing sm_count and acquiring nsm_mutex,
      it is possible for another task to find this nsm_handle, increment the
      use count and then enter nsm_release itself.
      
      Thus there's nothing to prevent the nsm being freed before we acquire
      nsm_mutex here.
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      164f98ad
    • N
      knfsd: Remove NLM_HOST_MAX and associated logic. · 1447d25e
      NeilBrown 提交于
      Lockd caches information about hosts that have recently held locks to
      expedite the taking of further locks.
      
      It periodically discards this information for hosts that have not been
      used for a few minutes.
      
      lockd currently has a value NLM_HOST_MAX, and changes the 'garbage
      collection' behaviour when the number of hosts exceeds this threshold.
      
      However its behaviour is strange, and likely not what was intended.
      When the number of hosts exceeds the max, it scans *less* often (every
      2 minutes vs every minute) and allows unused host information to
      remain around longer (5 minutes instead of 2).
      
      Having this limit is of dubious value anyway, and we have not
      suffered from the code not getting the limit right, so remove the
      limit altogether.  We go with the larger values (discard 5 minute old
      hosts every 2 minutes) as they are probably safer.
      
      Maybe the periodic garbage collection should be replace to with
      'shrinker' handler so we just respond to memory pressure....
      Acked-by: NJeff Layton <jlayton@redhat.com>
      Signed-off-by: NNeil Brown <neilb@suse.de>
      Signed-off-by: NJ. Bruce Fields <bfields@citi.umich.edu>
      1447d25e
  13. 20 3月, 2008 1 次提交
  14. 11 2月, 2008 1 次提交