aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/gfs2/file.c')
-rw-r--r--fs/gfs2/file.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index 26e2905070ed..6fbf3cbd974d 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -142,6 +142,7 @@ static const u32 fsflags_to_gfs2[32] = {
142 [7] = GFS2_DIF_NOATIME, 142 [7] = GFS2_DIF_NOATIME,
143 [12] = GFS2_DIF_EXHASH, 143 [12] = GFS2_DIF_EXHASH,
144 [14] = GFS2_DIF_INHERIT_JDATA, 144 [14] = GFS2_DIF_INHERIT_JDATA,
145 [17] = GFS2_DIF_TOPDIR,
145}; 146};
146 147
147static const u32 gfs2_to_fsflags[32] = { 148static const u32 gfs2_to_fsflags[32] = {
@@ -150,6 +151,7 @@ static const u32 gfs2_to_fsflags[32] = {
150 [gfs2fl_AppendOnly] = FS_APPEND_FL, 151 [gfs2fl_AppendOnly] = FS_APPEND_FL,
151 [gfs2fl_NoAtime] = FS_NOATIME_FL, 152 [gfs2fl_NoAtime] = FS_NOATIME_FL,
152 [gfs2fl_ExHash] = FS_INDEX_FL, 153 [gfs2fl_ExHash] = FS_INDEX_FL,
154 [gfs2fl_TopLevel] = FS_TOPDIR_FL,
153 [gfs2fl_InheritJdata] = FS_JOURNAL_DATA_FL, 155 [gfs2fl_InheritJdata] = FS_JOURNAL_DATA_FL,
154}; 156};
155 157
@@ -203,6 +205,7 @@ void gfs2_set_inode_flags(struct inode *inode)
203 GFS2_DIF_NOATIME| \ 205 GFS2_DIF_NOATIME| \
204 GFS2_DIF_SYNC| \ 206 GFS2_DIF_SYNC| \
205 GFS2_DIF_SYSTEM| \ 207 GFS2_DIF_SYSTEM| \
208 GFS2_DIF_TOPDIR| \
206 GFS2_DIF_INHERIT_JDATA) 209 GFS2_DIF_INHERIT_JDATA)
207 210
208/** 211/**
@@ -298,6 +301,7 @@ static int gfs2_set_flags(struct file *filp, u32 __user *ptr)
298 301
299 gfsflags = fsflags_cvt(fsflags_to_gfs2, fsflags); 302 gfsflags = fsflags_cvt(fsflags_to_gfs2, fsflags);
300 if (!S_ISDIR(inode->i_mode)) { 303 if (!S_ISDIR(inode->i_mode)) {
304 gfsflags &= ~GFS2_DIF_TOPDIR;
301 if (gfsflags & GFS2_DIF_INHERIT_JDATA) 305 if (gfsflags & GFS2_DIF_INHERIT_JDATA)
302 gfsflags ^= (GFS2_DIF_JDATA | GFS2_DIF_INHERIT_JDATA); 306 gfsflags ^= (GFS2_DIF_JDATA | GFS2_DIF_INHERIT_JDATA);
303 return do_gfs2_set_flags(filp, gfsflags, ~0); 307 return do_gfs2_set_flags(filp, gfsflags, ~0);