diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-01-21 07:28:05 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-01-21 07:28:05 -0800 |
commit | 30a0f5e1fb510f17c25ff159a9fffbe01ae0f34e (patch) | |
tree | 3392e115d4d5767c8bdaeac8696a2465d65a1e91 /fs/btrfs/acl.c | |
parent | 88f5004430babb836cfce886d5d54c82166f8ba4 (diff) | |
parent | 11dfe35a0108097f2df1f042c485fa7f758c2cdf (diff) | |
download | op-kernel-dev-30a0f5e1fb510f17c25ff159a9fffbe01ae0f34e.zip op-kernel-dev-30a0f5e1fb510f17c25ff159a9fffbe01ae0f34e.tar.gz |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable
* git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable:
Btrfs: fix possible panic on unmount
Btrfs: deal with NULL acl sent to btrfs_set_acl
Btrfs: fix regression in orphan cleanup
Btrfs: Fix race in btrfs_mark_extent_written
Btrfs, fix memory leaks in error paths
Btrfs: align offsets for btrfs_ordered_update_i_size
btrfs: fix missing last-entry in readdir(3)
Diffstat (limited to 'fs/btrfs/acl.c')
-rw-r--r-- | fs/btrfs/acl.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c index 2e9e699..54f4798 100644 --- a/fs/btrfs/acl.c +++ b/fs/btrfs/acl.c @@ -112,12 +112,14 @@ static int btrfs_set_acl(struct btrfs_trans_handle *trans, switch (type) { case ACL_TYPE_ACCESS: mode = inode->i_mode; - ret = posix_acl_equiv_mode(acl, &mode); - if (ret < 0) - return ret; - ret = 0; - inode->i_mode = mode; name = POSIX_ACL_XATTR_ACCESS; + if (acl) { + ret = posix_acl_equiv_mode(acl, &mode); + if (ret < 0) + return ret; + inode->i_mode = mode; + } + ret = 0; break; case ACL_TYPE_DEFAULT: if (!S_ISDIR(inode->i_mode)) |