diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2014-09-26 21:17:52 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2014-09-26 21:17:52 -0400 |
commit | e4502c63f56aeca887ced37f24e0def1ef11cec8 (patch) | |
tree | d63e8969b4f6b39565eaeeac8e9c2a400fd18a0b /fs/ufs/ialloc.c | |
parent | 2c80929c4c4d54e568b07ab85877d5fd38f4b02f (diff) | |
download | linux-stable-e4502c63f56aeca887ced37f24e0def1ef11cec8.tar.gz linux-stable-e4502c63f56aeca887ced37f24e0def1ef11cec8.tar.bz2 linux-stable-e4502c63f56aeca887ced37f24e0def1ef11cec8.zip |
ufs: deal with nfsd/iget races
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ufs/ialloc.c')
-rw-r--r-- | fs/ufs/ialloc.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/ufs/ialloc.c b/fs/ufs/ialloc.c index a9cc75ffa925..7caa01652888 100644 --- a/fs/ufs/ialloc.c +++ b/fs/ufs/ialloc.c @@ -298,7 +298,10 @@ cg_found: ufsi->i_oeftflag = 0; ufsi->i_dir_start_lookup = 0; memset(&ufsi->i_u1, 0, sizeof(ufsi->i_u1)); - insert_inode_hash(inode); + if (insert_inode_locked(inode) < 0) { + err = -EIO; + goto failed; + } mark_inode_dirty(inode); if (uspi->fs_magic == UFS2_MAGIC) { @@ -337,6 +340,7 @@ cg_found: fail_remove_inode: unlock_ufs(sb); clear_nlink(inode); + unlock_new_inode(inode); iput(inode); UFSD("EXIT (FAILED): err %d\n", err); return ERR_PTR(err); |