summaryrefslogtreecommitdiffstats
path: root/fs/jfs/acl.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-06-04 08:39:03 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2014-06-04 08:39:03 -0700
commitdaf342af2f7856fd2f5c66b9fb39a8f24986ca53 (patch)
tree9cb74ca3ea975e36afb7dbfe6c76b6805485e8b3 /fs/jfs/acl.c
parentba1bdefec36c45eef1f8aa44bd845c9ea3190506 (diff)
parentbb5e50aaa80564268f950d1b2f764455afbfea82 (diff)
Merge tag 'jfs-3.16' of git://github.com/kleikamp/linux-shaggy into next
Pull jfs changes from Dave Kleikamp. * tag 'jfs-3.16' of git://github.com/kleikamp/linux-shaggy: fs/jfs/super.c: convert simple_str to kstr fs/jfs/jfs_dmap.c: replace min/casting by min_t fs/jfs/super.c: remove 0 assignment to static + code clean-up fs/jfs/jfs_logmgr.c: remove NULL assignment on static JFS: Check for NULL before calling posix_acl_equiv_mode() fs/jfs/jfs_inode.c: atomically set inode->i_flags
Diffstat (limited to 'fs/jfs/acl.c')
-rw-r--r--fs/jfs/acl.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/fs/jfs/acl.c b/fs/jfs/acl.c
index 5a8ea16eedb..0c8ca830b11 100644
--- a/fs/jfs/acl.c
+++ b/fs/jfs/acl.c
@@ -83,13 +83,15 @@ static int __jfs_set_acl(tid_t tid, struct inode *inode, int type,
switch (type) {
case ACL_TYPE_ACCESS:
ea_name = POSIX_ACL_XATTR_ACCESS;
- rc = posix_acl_equiv_mode(acl, &inode->i_mode);
- if (rc < 0)
- return rc;
- inode->i_ctime = CURRENT_TIME;
- mark_inode_dirty(inode);
- if (rc == 0)
- acl = NULL;
+ if (acl) {
+ rc = posix_acl_equiv_mode(acl, &inode->i_mode);
+ if (rc < 0)
+ return rc;
+ inode->i_ctime = CURRENT_TIME;
+ mark_inode_dirty(inode);
+ if (rc == 0)
+ acl = NULL;
+ }
break;
case ACL_TYPE_DEFAULT:
ea_name = POSIX_ACL_XATTR_DEFAULT;