kernel/linux-2.6-btrfs-fix-acl.patch

26 lines
746 B
Diff
Raw Normal View History

2010-07-30 00:18:45 +00:00
diff -up linux-2.6.32.noarch/fs/btrfs/acl.c.orig linux-2.6.32.noarch/fs/btrfs/acl.c
--- linux-2.6.32.noarch/fs/btrfs/acl.c.orig 2009-12-02 22:51:21.000000000 -0500
+++ linux-2.6.32.noarch/fs/btrfs/acl.c 2010-01-14 15:36:25.926371944 -0500
@@ -110,13 +110,15 @@ static int btrfs_set_acl(struct inode *i
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) {
+ mode = inode->i_mode;
+ ret = posix_acl_equiv_mode(acl, &mode);
+ if (ret < 0)
+ return ret;
+ ret = 0;
+ inode->i_mode = mode;
+ }
break;
case ACL_TYPE_DEFAULT:
if (!S_ISDIR(inode->i_mode))