Skip to content

Commit

Permalink
vfs: do_dentry_open(): don't put filp
Browse files Browse the repository at this point in the history
Move put_filp() out to __dentry_open(), the only caller now.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
  • Loading branch information
Miklos Szeredi authored and Al Viro committed Jun 1, 2012
1 parent 90ad1a8 commit 78f71ef
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion fs/open.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,6 @@ static struct file *do_dentry_open(struct dentry *dentry, struct vfsmount *mnt,
f->f_path.dentry = NULL;
f->f_path.mnt = NULL;
cleanup_file:
put_filp(f);
dput(dentry);
mntput(mnt);
return ERR_PTR(error);
Expand All @@ -765,6 +764,8 @@ static struct file *__dentry_open(struct dentry *dentry, struct vfsmount *mnt,
fput(res);
res = ERR_PTR(error);
}
} else {
put_filp(f);
}
return res;
}
Expand Down

0 comments on commit 78f71ef

Please sign in to comment.