Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 233680
b: refs/heads/master
c: b4dc2b8
h: refs/heads/master
v: v3
  • Loading branch information
Li Zefan authored and Chris Mason committed Feb 16, 2011
1 parent 5567736 commit 1ad49ef
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 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: c87f08ca44e83b2c8d28f63f9c33f3a270a04bbe
refs/heads/master: b4dc2b8c694ead005b828f5fb7fa1134db5b6275
7 changes: 5 additions & 2 deletions trunk/fs/btrfs/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1071,12 +1071,15 @@ static noinline int btrfs_ioctl_subvol_setflags(struct file *file,
if (copy_from_user(&flags, arg, sizeof(flags)))
return -EFAULT;

if (flags & ~BTRFS_SUBVOL_CREATE_ASYNC)
if (flags & BTRFS_SUBVOL_CREATE_ASYNC)
return -EINVAL;

if (flags & ~BTRFS_SUBVOL_RDONLY)
return -EOPNOTSUPP;

if (!is_owner_or_cap(inode))
return -EACCES;

down_write(&root->fs_info->subvol_sem);

/* nothing to do */
Expand All @@ -1097,7 +1100,7 @@ static noinline int btrfs_ioctl_subvol_setflags(struct file *file,
goto out_reset;
}

ret = btrfs_update_root(trans, root,
ret = btrfs_update_root(trans, root->fs_info->tree_root,
&root->root_key, &root->root_item);

btrfs_commit_transaction(trans, root);
Expand Down

0 comments on commit 1ad49ef

Please sign in to comment.