diff options
author | Benjamin Marzinski <bmarzins@redhat.com> | 2015-05-05 13:25:48 -0400 |
---|---|---|
committer | Bob Peterson <rpeterso@redhat.com> | 2015-05-05 13:25:48 -0400 |
commit | 01e64ee40ad741037352d1d6202eaa432f833eb4 (patch) | |
tree | abc5b4b8440ee6e1c700e53677035f51584211cb | |
parent | a63b7bbc2175901d79fa36ba734499655c077f0d (diff) |
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>
-rw-r--r-- | fs/gfs2/file.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index 8ec43ab5babf..c706c6df4898 100644 --- a/fs/gfs2/file.c +++ b/fs/gfs2/file.c | |||
@@ -180,7 +180,7 @@ void gfs2_set_inode_flags(struct inode *inode) | |||
180 | 180 | ||
181 | flags &= ~(S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC|S_NOSEC); | 181 | flags &= ~(S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC|S_NOSEC); |
182 | if ((ip->i_eattr == 0) && !is_sxid(inode->i_mode)) | 182 | if ((ip->i_eattr == 0) && !is_sxid(inode->i_mode)) |
183 | inode->i_flags |= S_NOSEC; | 183 | flags |= S_NOSEC; |
184 | if (ip->i_diskflags & GFS2_DIF_IMMUTABLE) | 184 | if (ip->i_diskflags & GFS2_DIF_IMMUTABLE) |
185 | flags |= S_IMMUTABLE; | 185 | flags |= S_IMMUTABLE; |
186 | if (ip->i_diskflags & GFS2_DIF_APPENDONLY) | 186 | if (ip->i_diskflags & GFS2_DIF_APPENDONLY) |