aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorFabian Frederick <fabf@skynet.be>2014-04-14 03:39:01 -0400
committerDave Kleikamp <dave.kleikamp@oracle.com>2014-04-14 13:56:14 -0400
commit24e4a0f3de21ad715c9235367e241554c64b9adb (patch)
tree4911a3833ac2e2ea2450641b5cd0a8f4c3162543 /fs
parentc9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff)
fs/jfs/jfs_inode.c: atomically set inode->i_flags
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>
Diffstat (limited to 'fs')
-rw-r--r--fs/jfs/jfs_inode.c16
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 @@
29void jfs_set_inode_flags(struct inode *inode) 29void jfs_set_inode_flags(struct inode *inode)
30{ 30{
31 unsigned int flags = JFS_IP(inode)->mode2; 31 unsigned int flags = JFS_IP(inode)->mode2;
32 32 unsigned int new_fl = 0;
33 inode->i_flags &= ~(S_IMMUTABLE | S_APPEND |
34 S_NOATIME | S_DIRSYNC | S_SYNC);
35 33
36 if (flags & JFS_IMMUTABLE_FL) 34 if (flags & JFS_IMMUTABLE_FL)
37 inode->i_flags |= S_IMMUTABLE; 35 new_fl |= S_IMMUTABLE;
38 if (flags & JFS_APPEND_FL) 36 if (flags & JFS_APPEND_FL)
39 inode->i_flags |= S_APPEND; 37 new_fl |= S_APPEND;
40 if (flags & JFS_NOATIME_FL) 38 if (flags & JFS_NOATIME_FL)
41 inode->i_flags |= S_NOATIME; 39 new_fl |= S_NOATIME;
42 if (flags & JFS_DIRSYNC_FL) 40 if (flags & JFS_DIRSYNC_FL)
43 inode->i_flags |= S_DIRSYNC; 41 new_fl |= S_DIRSYNC;
44 if (flags & JFS_SYNC_FL) 42 if (flags & JFS_SYNC_FL)
45 inode->i_flags |= S_SYNC; 43 new_fl |= S_SYNC;
44 inode_set_flags(inode, new_fl, S_IMMUTABLE | S_APPEND | S_NOATIME |
45 S_DIRSYNC | S_SYNC);
46} 46}
47 47
48void jfs_get_inode_flags(struct jfs_inode_info *jfs_ip) 48void jfs_get_inode_flags(struct jfs_inode_info *jfs_ip)