Skip to contentSkip to conversation

GFS2: make sure S_NOSEC flag isn't overwritten

PATCH Superseded Benjamin Marzinski 2 participants 3 messages Apr 15, 2015 – May 5, 2015 GFS2 file system

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

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
index 6e600ab..80d1fd4 100644
@@ -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
#1 lore raw

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_flags inode->i_flags is set to flags, so we should be mondifying flags instead of inode->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

#2 lore raw

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_flags inode->i_flags is set to flags, so we should be mondifying flags instead of inode->i_flags, so it isn't overwritten.

---

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