Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 147946
b: refs/heads/master
c: b0be46e
h: refs/heads/master
v: v3
  • Loading branch information
Miklos Szeredi committed Apr 28, 2009
1 parent 8f45b54 commit eb96e73
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6b2db28a7a2da1064df9e179d9b6d07b0bfe156a
refs/heads/master: b0be46ebf72ca7478c1c4bd0153c42f90e768a03
9 changes: 4 additions & 5 deletions trunk/fs/fuse/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,14 @@ static struct fuse_file *fuse_file_get(struct fuse_file *ff)

static void fuse_release_end(struct fuse_conn *fc, struct fuse_req *req)
{
dput(req->misc.release.dentry);
mntput(req->misc.release.vfsmount);
path_put(&req->misc.release.path);
}

static void fuse_file_put(struct fuse_file *ff)
{
if (atomic_dec_and_test(&ff->count)) {
struct fuse_req *req = ff->reserved_req;
struct inode *inode = req->misc.release.dentry->d_inode;
struct inode *inode = req->misc.release.path.dentry->d_inode;
struct fuse_conn *fc = get_fuse_conn(inode);
req->end = fuse_release_end;
fuse_request_send_background(fc, req);
Expand Down Expand Up @@ -177,8 +176,8 @@ int fuse_release_common(struct inode *inode, struct file *file, int isdir)
isdir ? FUSE_RELEASEDIR : FUSE_RELEASE);

/* Hold vfsmount and dentry until release is finished */
req->misc.release.vfsmount = mntget(file->f_path.mnt);
req->misc.release.dentry = dget(file->f_path.dentry);
path_get(&file->f_path);
req->misc.release.path = file->f_path;

spin_lock(&fc->lock);
list_del(&ff->write_entry);
Expand Down
3 changes: 1 addition & 2 deletions trunk/fs/fuse/fuse_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,8 +248,7 @@ struct fuse_req {
struct fuse_forget_in forget_in;
struct {
struct fuse_release_in in;
struct vfsmount *vfsmount;
struct dentry *dentry;
struct path path;
} release;
struct fuse_init_in init_in;
struct fuse_init_out init_out;
Expand Down

0 comments on commit eb96e73

Please sign in to comment.