diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-28 16:03:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-28 16:03:41 -0400 |
commit | 36947a76826111e661a26cb0f668a5be6cc3ddb4 (patch) | |
tree | ed5d92c9d71f9ca68e6a3583a10ebf911c9c44dd /include | |
parent | a947e23a8ec04bccbfe98c5a2d64cd1f88b612d5 (diff) | |
parent | 69b4573296469fd3f70cf7044693074980517067 (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6: (36 commits)
Cache xattr security drop check for write v2
fs: block_page_mkwrite should wait for writeback to finish
mm: Wait for writeback when grabbing pages to begin a write
configfs: remove unnecessary dentry_unhash on rmdir, dir rename
fat: remove unnecessary dentry_unhash on rmdir, dir rename
hpfs: remove unnecessary dentry_unhash on rmdir, dir rename
minix: remove unnecessary dentry_unhash on rmdir, dir rename
fuse: remove unnecessary dentry_unhash on rmdir, dir rename
coda: remove unnecessary dentry_unhash on rmdir, dir rename
afs: remove unnecessary dentry_unhash on rmdir, dir rename
affs: remove unnecessary dentry_unhash on rmdir, dir rename
9p: remove unnecessary dentry_unhash on rmdir, dir rename
ncpfs: fix rename over directory with dangling references
ncpfs: document dentry_unhash usage
ecryptfs: remove unnecessary dentry_unhash on rmdir, dir rename
hostfs: remove unnecessary dentry_unhash on rmdir, dir rename
hfsplus: remove unnecessary dentry_unhash on rmdir, dir rename
hfs: remove unnecessary dentry_unhash on rmdir, dir rename
omfs: remove unnecessary dentry_unhash on rmdir, dir rneame
udf: remove unnecessary dentry_unhash from rmdir, dir rename
...
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/ext3_fs.h | 2 | ||||
-rw-r--r-- | include/linux/fs.h | 15 |
2 files changed, 15 insertions, 2 deletions
diff --git a/include/linux/ext3_fs.h b/include/linux/ext3_fs.h index 85c1d302c12e..5e06acf95d0f 100644 --- a/include/linux/ext3_fs.h +++ b/include/linux/ext3_fs.h | |||
@@ -909,7 +909,7 @@ extern int ext3_setattr (struct dentry *, struct iattr *); | |||
909 | extern void ext3_evict_inode (struct inode *); | 909 | extern void ext3_evict_inode (struct inode *); |
910 | extern int ext3_sync_inode (handle_t *, struct inode *); | 910 | extern int ext3_sync_inode (handle_t *, struct inode *); |
911 | extern void ext3_discard_reservation (struct inode *); | 911 | extern void ext3_discard_reservation (struct inode *); |
912 | extern void ext3_dirty_inode(struct inode *); | 912 | extern void ext3_dirty_inode(struct inode *, int); |
913 | extern int ext3_change_inode_journal_flag(struct inode *, int); | 913 | extern int ext3_change_inode_journal_flag(struct inode *, int); |
914 | extern int ext3_get_inode_loc(struct inode *, struct ext3_iloc *); | 914 | extern int ext3_get_inode_loc(struct inode *, struct ext3_iloc *); |
915 | extern int ext3_can_truncate(struct inode *inode); | 915 | extern int ext3_can_truncate(struct inode *inode); |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 241609346dfb..c55d6b7cd5d6 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -237,6 +237,7 @@ struct inodes_stat_t { | |||
237 | #define S_PRIVATE 512 /* Inode is fs-internal */ | 237 | #define S_PRIVATE 512 /* Inode is fs-internal */ |
238 | #define S_IMA 1024 /* Inode has an associated IMA struct */ | 238 | #define S_IMA 1024 /* Inode has an associated IMA struct */ |
239 | #define S_AUTOMOUNT 2048 /* Automount/referral quasi-directory */ | 239 | #define S_AUTOMOUNT 2048 /* Automount/referral quasi-directory */ |
240 | #define S_NOSEC 4096 /* no suid or xattr security attributes */ | ||
240 | 241 | ||
241 | /* | 242 | /* |
242 | * Note that nosuid etc flags are inode-specific: setting some file-system | 243 | * Note that nosuid etc flags are inode-specific: setting some file-system |
@@ -273,6 +274,7 @@ struct inodes_stat_t { | |||
273 | #define IS_PRIVATE(inode) ((inode)->i_flags & S_PRIVATE) | 274 | #define IS_PRIVATE(inode) ((inode)->i_flags & S_PRIVATE) |
274 | #define IS_IMA(inode) ((inode)->i_flags & S_IMA) | 275 | #define IS_IMA(inode) ((inode)->i_flags & S_IMA) |
275 | #define IS_AUTOMOUNT(inode) ((inode)->i_flags & S_AUTOMOUNT) | 276 | #define IS_AUTOMOUNT(inode) ((inode)->i_flags & S_AUTOMOUNT) |
277 | #define IS_NOSEC(inode) ((inode)->i_flags & S_NOSEC) | ||
276 | 278 | ||
277 | /* the read-only stuff doesn't really belong here, but any other place is | 279 | /* the read-only stuff doesn't really belong here, but any other place is |
278 | probably as bad and I don't want to create yet another include file. */ | 280 | probably as bad and I don't want to create yet another include file. */ |
@@ -1618,7 +1620,7 @@ struct super_operations { | |||
1618 | struct inode *(*alloc_inode)(struct super_block *sb); | 1620 | struct inode *(*alloc_inode)(struct super_block *sb); |
1619 | void (*destroy_inode)(struct inode *); | 1621 | void (*destroy_inode)(struct inode *); |
1620 | 1622 | ||
1621 | void (*dirty_inode) (struct inode *); | 1623 | void (*dirty_inode) (struct inode *, int flags); |
1622 | int (*write_inode) (struct inode *, struct writeback_control *wbc); | 1624 | int (*write_inode) (struct inode *, struct writeback_control *wbc); |
1623 | int (*drop_inode) (struct inode *); | 1625 | int (*drop_inode) (struct inode *); |
1624 | void (*evict_inode) (struct inode *); | 1626 | void (*evict_inode) (struct inode *); |
@@ -2582,5 +2584,16 @@ int __init get_filesystem_list(char *buf); | |||
2582 | #define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE) | \ | 2584 | #define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE) | \ |
2583 | (flag & __FMODE_NONOTIFY))) | 2585 | (flag & __FMODE_NONOTIFY))) |
2584 | 2586 | ||
2587 | static inline int is_sxid(mode_t mode) | ||
2588 | { | ||
2589 | return (mode & S_ISUID) || ((mode & S_ISGID) && (mode & S_IXGRP)); | ||
2590 | } | ||
2591 | |||
2592 | static inline void inode_has_no_xattr(struct inode *inode) | ||
2593 | { | ||
2594 | if (!is_sxid(inode->i_mode)) | ||
2595 | inode->i_flags |= S_NOSEC; | ||
2596 | } | ||
2597 | |||
2585 | #endif /* __KERNEL__ */ | 2598 | #endif /* __KERNEL__ */ |
2586 | #endif /* _LINUX_FS_H */ | 2599 | #endif /* _LINUX_FS_H */ |