diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-09-27 03:17:52 +0200 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-09-27 03:17:52 +0200 |
commit | e4502c63f56aeca887ced37f24e0def1ef11cec8 (patch) | |
tree | d63e8969b4f6b39565eaeeac8e9c2a400fd18a0b /fs/ufs/namei.c | |
parent | fuse: honour max_read and max_write in direct_io mode (diff) | |
download | linux-e4502c63f56aeca887ced37f24e0def1ef11cec8.tar.xz linux-e4502c63f56aeca887ced37f24e0def1ef11cec8.zip |
ufs: deal with nfsd/iget races
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ufs/namei.c')
-rw-r--r-- | fs/ufs/namei.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ufs/namei.c b/fs/ufs/namei.c index 2df62a73f20c..fd65deb4b5f0 100644 --- a/fs/ufs/namei.c +++ b/fs/ufs/namei.c @@ -38,10 +38,12 @@ static inline int ufs_add_nondir(struct dentry *dentry, struct inode *inode) { int err = ufs_add_link(dentry, inode); if (!err) { + unlock_new_inode(inode); d_instantiate(dentry, inode); return 0; } inode_dec_link_count(inode); + unlock_new_inode(inode); iput(inode); return err; } @@ -155,6 +157,7 @@ out_notlocked: out_fail: inode_dec_link_count(inode); + unlock_new_inode(inode); iput(inode); goto out; } @@ -210,6 +213,7 @@ out: out_fail: inode_dec_link_count(inode); inode_dec_link_count(inode); + unlock_new_inode(inode); iput (inode); inode_dec_link_count(dir); unlock_ufs(dir->i_sb); |