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>
This commit is contained in:
Dave Kleikamp
2007-04-25 09:36:20 -05:00
parent ba863a0016
commit 3e2221c73c
5 changed files with 23 additions and 1 deletions

View File

@@ -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()
*