]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
fuse: cleanup in release
authorMiklos Szeredi <mszeredi@suse.cz>
Wed, 17 Oct 2007 06:31:04 +0000 (23:31 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Wed, 17 Oct 2007 15:43:04 +0000 (08:43 -0700)
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 <mszeredi@suse.cz>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/fuse/dev.c
fs/fuse/file.c

index de25bff31420841febb159100299e26735071d2f..c78f60e1ba5d667642cb35cf13ce84baff7ed373 100644 (file)
@@ -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);
index f3ef2bde983b0e9df294126c4f8331d672ba0ebb..c4b98c03a46ef7c24761e70a723486067e3a9806 100644 (file)
@@ -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);
        }