소스 검색

9p: don't leave a half-initialized inode sitting around

Cc: stable@vger.kernel.org # all branches
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Al Viro 10 년 전
부모
커밋
0a73d0a204
2개의 변경된 파일2개의 추가작업 그리고 4개의 파일을 삭제
  1. 1 2
      fs/9p/vfs_inode.c
  2. 1 2
      fs/9p/vfs_inode_dotl.c

+ 1 - 2
fs/9p/vfs_inode.c

@@ -540,8 +540,7 @@ static struct inode *v9fs_qid_iget(struct super_block *sb,
 	unlock_new_inode(inode);
 	return inode;
 error:
-	unlock_new_inode(inode);
-	iput(inode);
+	iget_failed(inode);
 	return ERR_PTR(retval);
 
 }

+ 1 - 2
fs/9p/vfs_inode_dotl.c

@@ -149,8 +149,7 @@ static struct inode *v9fs_qid_iget_dotl(struct super_block *sb,
 	unlock_new_inode(inode);
 	return inode;
 error:
-	unlock_new_inode(inode);
-	iput(inode);
+	iget_failed(inode);
 	return ERR_PTR(retval);
 
 }