diff options
author | Fabian Frederick <fabf@skynet.be> | 2014-04-14 09:39:01 +0200 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-12-03 11:58:43 +0100 |
commit | 7e3bea443c47e2f499d7547dbabafbaacfa2f8e6 (patch) | |
tree | 256916c71bf687bd9ba95bbb4f963ac334ab0f49 /fs/jfs | |
parent | ec81c28104fd2198f076203be3d1bae5546e863f (diff) |
fs/jfs/jfs_inode.c: atomically set inode->i_flags
commit 24e4a0f3de21ad715c9235367e241554c64b9adb upstream.
According to commit 5f16f3225b0624
ext4: atomically set inode->i_flags in ext4_set_inode_flags()
Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
Diffstat (limited to 'fs/jfs')
-rw-r--r-- | fs/jfs/jfs_inode.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/jfs/jfs_inode.c b/fs/jfs/jfs_inode.c index 7f464c513ba0..6b0f816201a2 100644 --- a/fs/jfs/jfs_inode.c +++ b/fs/jfs/jfs_inode.c @@ -29,20 +29,20 @@ void jfs_set_inode_flags(struct inode *inode) { unsigned int flags = JFS_IP(inode)->mode2; - - inode->i_flags &= ~(S_IMMUTABLE | S_APPEND | - S_NOATIME | S_DIRSYNC | S_SYNC); + unsigned int new_fl = 0; if (flags & JFS_IMMUTABLE_FL) - inode->i_flags |= S_IMMUTABLE; + new_fl |= S_IMMUTABLE; if (flags & JFS_APPEND_FL) - inode->i_flags |= S_APPEND; + new_fl |= S_APPEND; if (flags & JFS_NOATIME_FL) - inode->i_flags |= S_NOATIME; + new_fl |= S_NOATIME; if (flags & JFS_DIRSYNC_FL) - inode->i_flags |= S_DIRSYNC; + new_fl |= S_DIRSYNC; if (flags & JFS_SYNC_FL) - inode->i_flags |= S_SYNC; + new_fl |= S_SYNC; + inode_set_flags(inode, new_fl, S_IMMUTABLE | S_APPEND | S_NOATIME | + S_DIRSYNC | S_SYNC); } void jfs_get_inode_flags(struct jfs_inode_info *jfs_ip) |