Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=70cc6487a4e08b8698c0e2ec935fb48d10490162
Commit:     70cc6487a4e08b8698c0e2ec935fb48d10490162
Parent:     c2fa1b8a6c059dd08a802545fed3badc8df2adc1
Author:     J. Bruce Fields <[EMAIL PROTECTED]>
AuthorDate: Thu Feb 22 18:48:53 2007 -0500
Committer:  J. Bruce Fields <[EMAIL PROTECTED]>
CommitDate: Sun May 6 17:38:19 2007 -0400

    locks: make ->lock release private data before returning in GETLK case
    
    The file_lock argument to ->lock is used to return the conflicting lock
    when found.  There's no reason for the filesystem to return any private
    information with this conflicting lock, but nfsv4 is.
    
    Fix nfsv4 client, and modify locks.c to stop calling fl_release_private
    for it in this case.
    
    Signed-off-by: "J. Bruce Fields" <[EMAIL PROTECTED]>
    Cc: "Trond Myklebust" <[EMAIL PROTECTED]>"
---
 fs/locks.c        |    4 ----
 fs/nfs/nfs4proc.c |    1 +
 2 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/fs/locks.c b/fs/locks.c
index 957775b..b07e6e6 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -1665,8 +1665,6 @@ int fcntl_getlk(struct file *filp, struct flock __user *l)
 
        if (filp->f_op && filp->f_op->lock) {
                error = filp->f_op->lock(filp, F_GETLK, &file_lock);
-               if (file_lock.fl_ops && file_lock.fl_ops->fl_release_private)
-                       file_lock.fl_ops->fl_release_private(&file_lock);
                if (error < 0)
                        goto out;
                else
@@ -1804,8 +1802,6 @@ int fcntl_getlk64(struct file *filp, struct flock64 
__user *l)
 
        if (filp->f_op && filp->f_op->lock) {
                error = filp->f_op->lock(filp, F_GETLK, &file_lock);
-               if (file_lock.fl_ops && file_lock.fl_ops->fl_release_private)
-                       file_lock.fl_ops->fl_release_private(&file_lock);
                if (error < 0)
                        goto out;
                else
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index f52cf5c..d9000ec 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3018,6 +3018,7 @@ static int _nfs4_proc_getlk(struct nfs4_state *state, int 
cmd, struct file_lock
                case -NFS4ERR_DENIED:
                        status = 0;
        }
+       request->fl_ops->fl_release_private(request);
 out:
        up_read(&clp->cl_sem);
        return status;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to