(Little) Patch about null dereference with acl and posix.
diff mbox

Message ID 61bf8f4f0911181328y794436ackb82acca35d578f46@mail.gmail.com
State Accepted
Headers show

Commit Message

briaeros007 Nov. 18, 2009, 9:28 p.m. UTC
None

Patch
diff mbox

diff --git a/fs/btrfs/acl.c b/fs/btrfs/acl.c
index 3616042..f8ade24 100644
--- a/fs/btrfs/acl.c
+++ b/fs/btrfs/acl.c
@@ -111,7 +111,8 @@  static int btrfs_set_acl(struct inode *inode,
struct posix_acl *acl, int type)
        switch (type) {
        case ACL_TYPE_ACCESS:
                mode = inode->i_mode;
-               ret = posix_acl_equiv_mode(acl, &mode);
+               if (acl && mode)
+                       ret = posix_acl_equiv_mode(acl, &mode);
                if (ret < 0)
                        return ret;