aboutsummaryrefslogtreecommitdiffstats
path: root/fs/jfs/jfs_inode.c
diff options
context:
space:
mode:
authorDave Kleikamp <shaggy@linux.vnet.ibm.com>2007-04-25 10:36:20 -0400
committerDave Kleikamp <shaggy@linux.vnet.ibm.com>2007-04-25 10:36:20 -0400
commit3e2221c73cba7d33fd5706f9bc4906ffaf421478 (patch)
treeebc979a87bc04417b071b973bd3dd462717694ad /fs/jfs/jfs_inode.c
parentba863a0016a33637acc7888698a5d75096fcec05 (diff)
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.c18
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)
45 inode->i_flags |= S_SYNC; 45 inode->i_flags |= S_SYNC;
46} 46}
47 47
48void jfs_get_inode_flags(struct jfs_inode_info *jfs_ip)
49{
50 unsigned int flags = jfs_ip->vfs_inode.i_flags;
51
52 jfs_ip->mode2 &= ~(JFS_IMMUTABLE_FL | JFS_APPEND_FL | JFS_NOATIME_FL |
53 JFS_DIRSYNC_FL | JFS_SYNC_FL);
54 if (flags & S_IMMUTABLE)
55 jfs_ip->mode2 |= JFS_IMMUTABLE_FL;
56 if (flags & S_APPEND)
57 jfs_ip->mode2 |= JFS_APPEND_FL;
58 if (flags & S_NOATIME)
59 jfs_ip->mode2 |= JFS_NOATIME_FL;
60 if (flags & S_DIRSYNC)
61 jfs_ip->mode2 |= JFS_DIRSYNC_FL;
62 if (flags & S_SYNC)
63 jfs_ip->mode2 |= JFS_SYNC_FL;
64}
65
48/* 66/*
49 * NAME: ialloc() 67 * NAME: ialloc()
50 * 68 *