summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/file.c
diff options
context:
space:
mode:
authorAbhi Das <adas@redhat.com>2015-11-10 22:07:26 +0100
committerBob Peterson <rpeterso@redhat.com>2015-11-10 22:11:06 +0100
commitacc546fd6108cb17f87f985e4235b68756d7b01f (patch)
treed32aca1fb2da92bc056e736ef03eba26d8843d9d /fs/gfs2/file.c
parentMerge git://www.linux-watchdog.org/linux-watchdog (diff)
downloadlinux-acc546fd6108cb17f87f985e4235b68756d7b01f.tar.xz
linux-acc546fd6108cb17f87f985e4235b68756d7b01f.zip
gfs2: Automatically set GFS2_DIF_SYSTEM flag on system files
When new files and directories are created inside a parent directory we automatically inherit the GFS2_DIF_SYSTEM flag (if set) and assign it to the new file/dirs. All new system files/dirs created in the metafs by, say gfs2_jadd, will have this flag set because they will have parent directories in the metafs whose GFS2_DIF_SYSTEM flag has already been set (most likely by a previous mkfs.gfs2) Signed-off-by: Abhi Das <adas@redhat.com> Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Diffstat (limited to 'fs/gfs2/file.c')
-rw-r--r--fs/gfs2/file.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c
index 5e425469f0c2..201282046693 100644
--- a/fs/gfs2/file.c
+++ b/fs/gfs2/file.c
@@ -298,9 +298,9 @@ static int gfs2_set_flags(struct file *filp, u32 __user *ptr)
gfsflags &= ~GFS2_DIF_TOPDIR;
if (gfsflags & GFS2_DIF_INHERIT_JDATA)
gfsflags ^= (GFS2_DIF_JDATA | GFS2_DIF_INHERIT_JDATA);
- return do_gfs2_set_flags(filp, gfsflags, ~0);
+ return do_gfs2_set_flags(filp, gfsflags, ~GFS2_DIF_SYSTEM);
}
- return do_gfs2_set_flags(filp, gfsflags, ~GFS2_DIF_JDATA);
+ return do_gfs2_set_flags(filp, gfsflags, ~(GFS2_DIF_SYSTEM | GFS2_DIF_JDATA));
}
static long gfs2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)