Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

GFS2: make sure S_NOSEC flag isn't overwritten

At the end of gfs2_set_inode_flags inode->i_flags is set to flags, so
we should be modifying flags instead of inode->i_flags, so it isn't
overwritten.

Signed-off-by: Benjamin Marzinski <bmarzins redhat com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>

authored by

Benjamin Marzinski and committed by
Bob Peterson
01e64ee4 a63b7bbc

+1 -1
+1 -1
fs/gfs2/file.c
··· 180 180 181 181 flags &= ~(S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC|S_NOSEC); 182 182 if ((ip->i_eattr == 0) && !is_sxid(inode->i_mode)) 183 - inode->i_flags |= S_NOSEC; 183 + flags |= S_NOSEC; 184 184 if (ip->i_diskflags & GFS2_DIF_IMMUTABLE) 185 185 flags |= S_IMMUTABLE; 186 186 if (ip->i_diskflags & GFS2_DIF_APPENDONLY)