diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2011-06-16 15:06:55 +0200 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2011-07-15 10:32:35 +0200 |
commit | 9964afbb797329e4c6e5d05ebc199c39af618c5f (patch) | |
tree | c0877e423f5dff8b722869bd3f21622a88889220 /fs/gfs2/file.c | |
parent | GFS2: Automatically adjust glock min hold time (diff) | |
download | linux-9964afbb797329e4c6e5d05ebc199c39af618c5f.tar.xz linux-9964afbb797329e4c6e5d05ebc199c39af618c5f.zip |
GFS2: Add S_NOSEC support
This adds S_NOSEC support to GFS2. We set/reset the flag either when
a user calls setattr or when we have just regained the glock
from another node. The flag is only set if there are no xattrs
on the inode and there is no suid bit set.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Reviewed-by: Andi Kleen <ak@linux.intel.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Diffstat (limited to 'fs/gfs2/file.c')
-rw-r--r-- | fs/gfs2/file.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index a9f5cbe45cd9..bc2590ef5fc1 100644 --- a/fs/gfs2/file.c +++ b/fs/gfs2/file.c @@ -174,7 +174,9 @@ void gfs2_set_inode_flags(struct inode *inode) struct gfs2_inode *ip = GFS2_I(inode); unsigned int flags = inode->i_flags; - flags &= ~(S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC); + 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; if (ip->i_diskflags & GFS2_DIF_IMMUTABLE) flags |= S_IMMUTABLE; if (ip->i_diskflags & GFS2_DIF_APPENDONLY) |