diff options
author | Dave Kleikamp <shaggy@linux.vnet.ibm.com> | 2007-04-25 18:36:20 +0400 |
---|---|---|
committer | Dave Kleikamp <shaggy@linux.vnet.ibm.com> | 2007-04-25 18:36:20 +0400 |
commit | 3e2221c73cba7d33fd5706f9bc4906ffaf421478 (patch) | |
tree | ebc979a87bc04417b071b973bd3dd462717694ad /fs/jfs/jfs_inode.c | |
parent | ba863a0016a33637acc7888698a5d75096fcec05 (diff) | |
download | linux-3e2221c73cba7d33fd5706f9bc4906ffaf421478.tar.xz |
Copy i_flags to jfs inode flags on write
This mirrors Jan Kara's patches for ext3. This patch makes sure that
changes made to inode->i_flags are reflected on disk for jfs. It also
moves a call of jfs_set_inode_flags() to be more consistent with where
jfs_get_inode_flags() is called.
Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Diffstat (limited to 'fs/jfs/jfs_inode.c')
-rw-r--r-- | fs/jfs/jfs_inode.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/fs/jfs/jfs_inode.c b/fs/jfs/jfs_inode.c index 4c67ed97682b..ed6574bee51a 100644 --- a/fs/jfs/jfs_inode.c +++ b/fs/jfs/jfs_inode.c @@ -45,6 +45,24 @@ void jfs_set_inode_flags(struct inode *inode) inode->i_flags |= S_SYNC; } +void jfs_get_inode_flags(struct jfs_inode_info *jfs_ip) +{ + unsigned int flags = jfs_ip->vfs_inode.i_flags; + + jfs_ip->mode2 &= ~(JFS_IMMUTABLE_FL | JFS_APPEND_FL | JFS_NOATIME_FL | + JFS_DIRSYNC_FL | JFS_SYNC_FL); + if (flags & S_IMMUTABLE) + jfs_ip->mode2 |= JFS_IMMUTABLE_FL; + if (flags & S_APPEND) + jfs_ip->mode2 |= JFS_APPEND_FL; + if (flags & S_NOATIME) + jfs_ip->mode2 |= JFS_NOATIME_FL; + if (flags & S_DIRSYNC) + jfs_ip->mode2 |= JFS_DIRSYNC_FL; + if (flags & S_SYNC) + jfs_ip->mode2 |= JFS_SYNC_FL; +} + /* * NAME: ialloc() * |