Commit 24e4a0f3 authored by Fabian Frederick's avatar Fabian Frederick Committed by Dave Kleikamp

fs/jfs/jfs_inode.c: atomically set inode->i_flags

According to commit 5f16f322

ext4: atomically set inode->i_flags in ext4_set_inode_flags()
Signed-off-by: default avatarFabian Frederick <fabf@skynet.be>
Signed-off-by: default avatarDave Kleikamp <dave.kleikamp@oracle.com>
Cc: "Theodore Ts'o" <tytso@mit.edu>
parent c9eaa447
...@@ -29,20 +29,20 @@ ...@@ -29,20 +29,20 @@
void jfs_set_inode_flags(struct inode *inode) void jfs_set_inode_flags(struct inode *inode)
{ {
unsigned int flags = JFS_IP(inode)->mode2; unsigned int flags = JFS_IP(inode)->mode2;
unsigned int new_fl = 0;
inode->i_flags &= ~(S_IMMUTABLE | S_APPEND |
S_NOATIME | S_DIRSYNC | S_SYNC);
if (flags & JFS_IMMUTABLE_FL) if (flags & JFS_IMMUTABLE_FL)
inode->i_flags |= S_IMMUTABLE; new_fl |= S_IMMUTABLE;
if (flags & JFS_APPEND_FL) if (flags & JFS_APPEND_FL)
inode->i_flags |= S_APPEND; new_fl |= S_APPEND;
if (flags & JFS_NOATIME_FL) if (flags & JFS_NOATIME_FL)
inode->i_flags |= S_NOATIME; new_fl |= S_NOATIME;
if (flags & JFS_DIRSYNC_FL) if (flags & JFS_DIRSYNC_FL)
inode->i_flags |= S_DIRSYNC; new_fl |= S_DIRSYNC;
if (flags & JFS_SYNC_FL) 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) void jfs_get_inode_flags(struct jfs_inode_info *jfs_ip)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment