Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 328999
b: refs/heads/master
c: ecd1881
h: refs/heads/master
i:
  328997: 962f64b
  328995: 5f13b14
  328991: 6a25c88
v: v3
  • Loading branch information
Al Viro committed Sep 27, 2012
1 parent 2dbcc6a commit 1a0ac2f
Show file tree
Hide file tree
Showing 2 changed files with 8 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: 6bdf2954016ef7c1f4d4fa07a338ee197d9c3506
refs/heads/master: ecd188159efa112770d5f8a4a62f8d3586784f48
14 changes: 7 additions & 7 deletions trunk/fs/btrfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1422,7 +1422,8 @@ static noinline int btrfs_ioctl_snap_create_transid(struct file *file,
NULL, transid, readonly, inherit);
} else {
struct inode *src_inode;
src_file = fget(fd);
int fput_needed;
src_file = fget_light(fd, &fput_needed);
if (!src_file) {
ret = -EINVAL;
goto out_drop_write;
Expand All @@ -1433,13 +1434,12 @@ static noinline int btrfs_ioctl_snap_create_transid(struct file *file,
printk(KERN_INFO "btrfs: Snapshot src from "
"another FS\n");
ret = -EINVAL;
fput(src_file);
goto out_drop_write;
} else {
ret = btrfs_mksubvol(&file->f_path, name, namelen,
BTRFS_I(src_inode)->root,
transid, readonly, inherit);
}
ret = btrfs_mksubvol(&file->f_path, name, namelen,
BTRFS_I(src_inode)->root,
transid, readonly, inherit);
fput(src_file);
fput_light(src_file, fput_needed);
}
out_drop_write:
mnt_drop_write_file(file);
Expand Down

0 comments on commit 1a0ac2f

Please sign in to comment.