diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2008-11-04 05:05:22 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2009-01-05 02:38:59 -0500 |
commit | 383f01fbf4a701b73f5e35ea805ed1700b4b4db9 (patch) | |
tree | b2b7a1a188088f319a29e8cc4cc924490837352b /fs/gfs2/ops_file.c | |
parent | c9e98886776386f1f7828d9685e78cd341849867 (diff) |
GFS2: Banish struct gfs2_dinode_host
The final field in gfs2_dinode_host was the i_flags field. Thats
renamed to i_diskflags in order to avoid confusion with the existing
inode flags, and moved into the inode proper at a suitable location
to avoid creating a "hole".
At that point struct gfs2_dinode_host is no longer needed and as
promised (quite some time ago!) it can now be removed completely.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/ops_file.c')
-rw-r--r-- | fs/gfs2/ops_file.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/fs/gfs2/ops_file.c b/fs/gfs2/ops_file.c index d7e649ed62f2..a6b7a733fd4d 100644 --- a/fs/gfs2/ops_file.c +++ b/fs/gfs2/ops_file.c | |||
@@ -157,8 +157,8 @@ static int gfs2_get_flags(struct file *filp, u32 __user *ptr) | |||
157 | if (error) | 157 | if (error) |
158 | return error; | 158 | return error; |
159 | 159 | ||
160 | fsflags = fsflags_cvt(gfs2_to_fsflags, ip->i_di.di_flags); | 160 | fsflags = fsflags_cvt(gfs2_to_fsflags, ip->i_diskflags); |
161 | if (!S_ISDIR(inode->i_mode) && ip->i_di.di_flags & GFS2_DIF_JDATA) | 161 | if (!S_ISDIR(inode->i_mode) && ip->i_diskflags & GFS2_DIF_JDATA) |
162 | fsflags |= FS_JOURNAL_DATA_FL; | 162 | fsflags |= FS_JOURNAL_DATA_FL; |
163 | if (put_user(fsflags, ptr)) | 163 | if (put_user(fsflags, ptr)) |
164 | error = -EFAULT; | 164 | error = -EFAULT; |
@@ -171,17 +171,16 @@ static int gfs2_get_flags(struct file *filp, u32 __user *ptr) | |||
171 | void gfs2_set_inode_flags(struct inode *inode) | 171 | void gfs2_set_inode_flags(struct inode *inode) |
172 | { | 172 | { |
173 | struct gfs2_inode *ip = GFS2_I(inode); | 173 | struct gfs2_inode *ip = GFS2_I(inode); |
174 | struct gfs2_dinode_host *di = &ip->i_di; | ||
175 | unsigned int flags = inode->i_flags; | 174 | unsigned int flags = inode->i_flags; |
176 | 175 | ||
177 | flags &= ~(S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC); | 176 | flags &= ~(S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC); |
178 | if (di->di_flags & GFS2_DIF_IMMUTABLE) | 177 | if (ip->i_diskflags & GFS2_DIF_IMMUTABLE) |
179 | flags |= S_IMMUTABLE; | 178 | flags |= S_IMMUTABLE; |
180 | if (di->di_flags & GFS2_DIF_APPENDONLY) | 179 | if (ip->i_diskflags & GFS2_DIF_APPENDONLY) |
181 | flags |= S_APPEND; | 180 | flags |= S_APPEND; |
182 | if (di->di_flags & GFS2_DIF_NOATIME) | 181 | if (ip->i_diskflags & GFS2_DIF_NOATIME) |
183 | flags |= S_NOATIME; | 182 | flags |= S_NOATIME; |
184 | if (di->di_flags & GFS2_DIF_SYNC) | 183 | if (ip->i_diskflags & GFS2_DIF_SYNC) |
185 | flags |= S_SYNC; | 184 | flags |= S_SYNC; |
186 | inode->i_flags = flags; | 185 | inode->i_flags = flags; |
187 | } | 186 | } |
@@ -220,7 +219,7 @@ static int do_gfs2_set_flags(struct file *filp, u32 reqflags, u32 mask) | |||
220 | if (error) | 219 | if (error) |
221 | goto out_drop_write; | 220 | goto out_drop_write; |
222 | 221 | ||
223 | flags = ip->i_di.di_flags; | 222 | flags = ip->i_diskflags; |
224 | new_flags = (flags & ~mask) | (reqflags & mask); | 223 | new_flags = (flags & ~mask) | (reqflags & mask); |
225 | if ((new_flags ^ flags) == 0) | 224 | if ((new_flags ^ flags) == 0) |
226 | goto out; | 225 | goto out; |
@@ -259,7 +258,7 @@ static int do_gfs2_set_flags(struct file *filp, u32 reqflags, u32 mask) | |||
259 | if (error) | 258 | if (error) |
260 | goto out_trans_end; | 259 | goto out_trans_end; |
261 | gfs2_trans_add_bh(ip->i_gl, bh, 1); | 260 | gfs2_trans_add_bh(ip->i_gl, bh, 1); |
262 | ip->i_di.di_flags = new_flags; | 261 | ip->i_diskflags = new_flags; |
263 | gfs2_dinode_out(ip, bh->b_data); | 262 | gfs2_dinode_out(ip, bh->b_data); |
264 | brelse(bh); | 263 | brelse(bh); |
265 | gfs2_set_inode_flags(inode); | 264 | gfs2_set_inode_flags(inode); |