aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2008-12-30 01:48:21 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2008-12-31 18:07:43 -0500
commit261bca86ed4f7f391d1938167624e78da61dcc6b (patch)
tree4601cf090fbfec31fbd554a27c67c717a7caba4b /include/linux
parent272eb01485dda98e3b8910c7c1a53d597616b0a0 (diff)
nfsd/create race fixes, infrastructure
new helpers - insert_inode_locked() and insert_inode_locked4(). Hash new inode, making sure that there's no such inode in icache already. If there is and it does not end up unhashed (as would happen if we have nfsd trying to resolve a bogus fhandle), fail. Otherwise insert our inode into hash and succeed. In either case have i_state set to new+locked; cleanup ends up being simpler with such calling conventions. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/fs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index be16ce01fb1b..e2170ee21e18 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1902,6 +1902,8 @@ extern struct inode *ilookup(struct super_block *sb, unsigned long ino);
1902 1902
1903extern struct inode * iget5_locked(struct super_block *, unsigned long, int (*test)(struct inode *, void *), int (*set)(struct inode *, void *), void *); 1903extern struct inode * iget5_locked(struct super_block *, unsigned long, int (*test)(struct inode *, void *), int (*set)(struct inode *, void *), void *);
1904extern struct inode * iget_locked(struct super_block *, unsigned long); 1904extern struct inode * iget_locked(struct super_block *, unsigned long);
1905extern int insert_inode_locked4(struct inode *, unsigned long, int (*test)(struct inode *, void *), void *);
1906extern int insert_inode_locked(struct inode *);
1905extern void unlock_new_inode(struct inode *); 1907extern void unlock_new_inode(struct inode *);
1906 1908
1907extern void __iget(struct inode * inode); 1909extern void __iget(struct inode * inode);