GFS2: make sure S_NOSEC flag isn't overwritten
PATCH 1/1 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 mondifying flags instead of inode->i_flags, so it isn't overwritten.
--- fs/gfs2/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/gfs2/file.c +1 -1
@@ -181,7 +181,7 @@ void gfs2_set_inode_flags(struct inode *inode) flags &= ~(S_SYNC |S_APPEND |S_IMMUTABLE |S_NOATIME |S_DIRSYNC |S_NOSEC );if ((ip->i_eattr ==0 ) && !is_sxid (inode->i_mode)) - inode->i_flags |=S_NOSEC ; + flags |=S_NOSEC ;if (ip->i_diskflags &GFS2_DIF_IMMUTABLE ) flags |=S_IMMUTABLE ;if (ip->i_diskflags &GFS2_DIF_APPENDONLY )
Signature · 1 line
2.1.0
PATCH 1/1 GFS2: make sure S_NOSEC flag isn't overwritten
Hi,
----- Original Message -----
Quoted 2 lines
At the end of
gfs2_set_inode_flagsinode->i_flagsis set to flags, so we should be mondifying flags instead ofinode->i_flags, so it isn't
Patch looks good, but "mondifying" looks like a type and should probably be fixed.
Regards,
Bob Peterson
Red Hat File Systems
PATCH v2 1/1 GFS2: make sure S_NOSEC flag isn't overwritten
In reply to Benjamin Marzinski----- Original Message -----
Quoted 6 lines
At the end of
gfs2_set_inode_flagsinode->i_flagsis set to flags, so we should be mondifying flags instead ofinode->i_flags, so it isn't overwritten.Signed-off-by Benjamin Marzinski <[email protected]>---
Hi,
The v2 version of the patch is now in the for-next branch of the linux-gfs2 tree:
https://git.kernel.org/cgit/linux/kernel/git/gfs2/linux-gfs2.git/commit/fs/gfs2?h=for-next&id=01e64ee40ad741037352d1d6202eaa432f833eb4
Regards,
Bob Peterson
Red Hat File Systems