diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-13 23:25:58 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2018-08-13 23:25:58 -0400 |
| commit | 0ea97a2d61df729ccce75b00a2fa37d39a508ab6 (patch) | |
| tree | 953c13d8309938b93af2c257de8f7b84004ae748 /include/linux | |
| parent | a66b4cd1e7163adb327838a3c81faaf6a9330d5a (diff) | |
| parent | c7b15a8657da7f8d11269c7cc3d8beef10d26b43 (diff) | |
Merge branch 'work.mkdir' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull vfs icache updates from Al Viro:
- NFS mkdir/open_by_handle race fix
- analogous solution for FUSE, replacing the one currently in mainline
- new primitive to be used when discarding halfway set up inodes on
failed object creation; gives sane warranties re icache lookups not
returning such doomed by still not freed inodes. A bunch of
filesystems switched to that animal.
- Miklos' fix for last cycle regression in iget5_locked(); -stable will
need a slightly different variant, unfortunately.
- misc bits and pieces around things icache-related (in adfs and jfs).
* 'work.mkdir' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
jfs: don't bother with make_bad_inode() in ialloc()
adfs: don't put inodes into icache
new helper: inode_fake_hash()
vfs: don't evict uninitialized inode
jfs: switch to discard_new_inode()
ext2: make sure that partially set up inodes won't be returned by ext2_iget()
udf: switch to discard_new_inode()
ufs: switch to discard_new_inode()
btrfs: switch to discard_new_inode()
new primitive: discard_new_inode()
kill d_instantiate_no_diralias()
nfs_instantiate(): prevent multiple aliases for directory inode
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/dcache.h | 1 | ||||
| -rw-r--r-- | include/linux/fs.h | 17 |
2 files changed, 16 insertions, 2 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 66c6e17e61e5..0b83629a3d8f 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
| @@ -227,7 +227,6 @@ extern void d_instantiate(struct dentry *, struct inode *); | |||
| 227 | extern void d_instantiate_new(struct dentry *, struct inode *); | 227 | extern void d_instantiate_new(struct dentry *, struct inode *); |
| 228 | extern struct dentry * d_instantiate_unique(struct dentry *, struct inode *); | 228 | extern struct dentry * d_instantiate_unique(struct dentry *, struct inode *); |
| 229 | extern struct dentry * d_instantiate_anon(struct dentry *, struct inode *); | 229 | extern struct dentry * d_instantiate_anon(struct dentry *, struct inode *); |
| 230 | extern int d_instantiate_no_diralias(struct dentry *, struct inode *); | ||
| 231 | extern void __d_drop(struct dentry *dentry); | 230 | extern void __d_drop(struct dentry *dentry); |
| 232 | extern void d_drop(struct dentry *dentry); | 231 | extern void d_drop(struct dentry *dentry); |
| 233 | extern void d_delete(struct dentry *); | 232 | extern void d_delete(struct dentry *); |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 7899737a9a3e..180334710596 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
| @@ -688,6 +688,17 @@ static inline int inode_unhashed(struct inode *inode) | |||
| 688 | } | 688 | } |
| 689 | 689 | ||
| 690 | /* | 690 | /* |
| 691 | * __mark_inode_dirty expects inodes to be hashed. Since we don't | ||
| 692 | * want special inodes in the fileset inode space, we make them | ||
| 693 | * appear hashed, but do not put on any lists. hlist_del() | ||
| 694 | * will work fine and require no locking. | ||
| 695 | */ | ||
| 696 | static inline void inode_fake_hash(struct inode *inode) | ||
| 697 | { | ||
| 698 | hlist_add_fake(&inode->i_hash); | ||
| 699 | } | ||
| 700 | |||
| 701 | /* | ||
| 691 | * inode->i_mutex nesting subclasses for the lock validator: | 702 | * inode->i_mutex nesting subclasses for the lock validator: |
| 692 | * | 703 | * |
| 693 | * 0: the object of the current VFS operation | 704 | * 0: the object of the current VFS operation |
| @@ -2017,6 +2028,8 @@ static inline void init_sync_kiocb(struct kiocb *kiocb, struct file *filp) | |||
| 2017 | * I_OVL_INUSE Used by overlayfs to get exclusive ownership on upper | 2028 | * I_OVL_INUSE Used by overlayfs to get exclusive ownership on upper |
| 2018 | * and work dirs among overlayfs mounts. | 2029 | * and work dirs among overlayfs mounts. |
| 2019 | * | 2030 | * |
| 2031 | * I_CREATING New object's inode in the middle of setting up. | ||
| 2032 | * | ||
| 2020 | * Q: What is the difference between I_WILL_FREE and I_FREEING? | 2033 | * Q: What is the difference between I_WILL_FREE and I_FREEING? |
| 2021 | */ | 2034 | */ |
| 2022 | #define I_DIRTY_SYNC (1 << 0) | 2035 | #define I_DIRTY_SYNC (1 << 0) |
| @@ -2037,7 +2050,8 @@ static inline void init_sync_kiocb(struct kiocb *kiocb, struct file *filp) | |||
| 2037 | #define __I_DIRTY_TIME_EXPIRED 12 | 2050 | #define __I_DIRTY_TIME_EXPIRED 12 |
| 2038 | #define I_DIRTY_TIME_EXPIRED (1 << __I_DIRTY_TIME_EXPIRED) | 2051 | #define I_DIRTY_TIME_EXPIRED (1 << __I_DIRTY_TIME_EXPIRED) |
| 2039 | #define I_WB_SWITCH (1 << 13) | 2052 | #define I_WB_SWITCH (1 << 13) |
| 2040 | #define I_OVL_INUSE (1 << 14) | 2053 | #define I_OVL_INUSE (1 << 14) |
| 2054 | #define I_CREATING (1 << 15) | ||
| 2041 | 2055 | ||
| 2042 | #define I_DIRTY_INODE (I_DIRTY_SYNC | I_DIRTY_DATASYNC) | 2056 | #define I_DIRTY_INODE (I_DIRTY_SYNC | I_DIRTY_DATASYNC) |
| 2043 | #define I_DIRTY (I_DIRTY_INODE | I_DIRTY_PAGES) | 2057 | #define I_DIRTY (I_DIRTY_INODE | I_DIRTY_PAGES) |
| @@ -2919,6 +2933,7 @@ extern void lockdep_annotate_inode_mutex_key(struct inode *inode); | |||
| 2919 | static inline void lockdep_annotate_inode_mutex_key(struct inode *inode) { }; | 2933 | static inline void lockdep_annotate_inode_mutex_key(struct inode *inode) { }; |
| 2920 | #endif | 2934 | #endif |
| 2921 | extern void unlock_new_inode(struct inode *); | 2935 | extern void unlock_new_inode(struct inode *); |
| 2936 | extern void discard_new_inode(struct inode *); | ||
| 2922 | extern unsigned int get_next_ino(void); | 2937 | extern unsigned int get_next_ino(void); |
| 2923 | extern void evict_inodes(struct super_block *sb); | 2938 | extern void evict_inodes(struct super_block *sb); |
| 2924 | 2939 | ||
