]> git.karo-electronics.de Git - linux-beck.git/commitdiff
nfsd4: eliminate lease delete callback
authorJ. Bruce Fields <bfields@redhat.com>
Sat, 30 Oct 2010 21:41:26 +0000 (17:41 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Tue, 4 Jan 2011 21:49:26 +0000 (16:49 -0500)
nfsd controls the lifetime of the lease, not the lock code, so there's
no need for this callback on lease destruction.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Documentation/filesystems/Locking
fs/nfsd/nfs4state.c

index b6426f15b4ae85f5469b962806004237b9b5607e..075be12bc5314928b5576c036078e1588bee5a35 100644 (file)
@@ -327,14 +327,12 @@ fl_release_private:       yes     yes
 prototypes:
        int (*fl_compare_owner)(struct file_lock *, struct file_lock *);
        void (*fl_notify)(struct file_lock *);  /* unblock callback */
-       void (*fl_release_private)(struct file_lock *);
        void (*fl_break)(struct file_lock *); /* break_lease callback */
 
 locking rules:
                        BKL     may block
 fl_compare_owner:      yes     no
 fl_notify:             yes     no
-fl_release_private:    yes     yes
 fl_break:              yes     no
 
        Currently only NFSD and NLM provide instances of this class. None of the
index b82e36862044deaea20a22b19ada77a97599db0e..2e44ad2539aba641a801ddd6d642a67104b47458 100644 (file)
@@ -2295,23 +2295,6 @@ void nfsd_break_deleg_cb(struct file_lock *fl)
        nfsd4_cb_recall(dp);
 }
 
-/*
- * The file_lock is being reapd.
- *
- * Called by locks_free_lock() with lock_flocks() held.
- */
-static
-void nfsd_release_deleg_cb(struct file_lock *fl)
-{
-       struct nfs4_delegation *dp = (struct nfs4_delegation *)fl->fl_owner;
-
-       dprintk("NFSD nfsd_release_deleg_cb: fl %p dp %p dl_count %d\n", fl,dp, atomic_read(&dp->dl_count));
-
-       if (!(fl->fl_flags & FL_LEASE) || !dp)
-               return;
-       dp->dl_flock = NULL;
-}
-
 /*
  * Called from setlease() with lock_flocks() held
  */
@@ -2341,7 +2324,6 @@ int nfsd_change_deleg_cb(struct file_lock **onlist, int arg)
 
 static const struct lock_manager_operations nfsd_lease_mng_ops = {
        .fl_break = nfsd_break_deleg_cb,
-       .fl_release_private = nfsd_release_deleg_cb,
        .fl_mylease = nfsd_same_client_deleg_cb,
        .fl_change = nfsd_change_deleg_cb,
 };