Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=819c4b3b4009275caae973691378235c177a1429
Commit:     819c4b3b4009275caae973691378235c177a1429
Parent:     ebc14c4dbeb56195950058db9aa32de06c22de0d
Author:     Miklos Szeredi <[EMAIL PROTECTED]>
AuthorDate: Tue Oct 16 23:31:04 2007 -0700
Committer:  Linus Torvalds <[EMAIL PROTECTED]>
CommitDate: Wed Oct 17 08:43:04 2007 -0700

    fuse: cleanup in release
    
    Move dput/mntput pair from request_end() to fuse_release_end(), because
    there's no other place they are used.
    
    Signed-off-by: Miklos Szeredi <[EMAIL PROTECTED]>
    Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>
    Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]>
---
 fs/fuse/dev.c  |    2 --
 fs/fuse/file.c |    8 ++++++++
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/fs/fuse/dev.c b/fs/fuse/dev.c
index de25bff..c78f60e 100644
--- a/fs/fuse/dev.c
+++ b/fs/fuse/dev.c
@@ -231,8 +231,6 @@ static void request_end(struct fuse_conn *fc, struct 
fuse_req *req)
                fc->num_background--;
        }
        spin_unlock(&fc->lock);
-       dput(req->dentry);
-       mntput(req->vfsmount);
        wake_up(&req->waitq);
        if (end)
                end(fc, req);
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index f3ef2bd..c4b98c0 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -71,11 +71,19 @@ static struct fuse_file *fuse_file_get(struct fuse_file *ff)
        return ff;
 }
 
+static void fuse_release_end(struct fuse_conn *fc, struct fuse_req *req)
+{
+       dput(req->dentry);
+       mntput(req->vfsmount);
+       fuse_put_request(fc, req);
+}
+
 static void fuse_file_put(struct fuse_file *ff)
 {
        if (atomic_dec_and_test(&ff->count)) {
                struct fuse_req *req = ff->reserved_req;
                struct fuse_conn *fc = get_fuse_conn(req->dentry->d_inode);
+               req->end = fuse_release_end;
                request_send_background(fc, req);
                kfree(ff);
        }
-
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