new helper: ihold()
Clones an existing reference to inode; caller must already hold one. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
parent
646ec4615c
commit
7de9c6ee3e
40 changed files with 57 additions and 49 deletions
|
@ -377,7 +377,7 @@ static int sock_alloc_file(struct socket *sock, struct file **f, int flags)
|
|||
&socket_file_ops);
|
||||
if (unlikely(!file)) {
|
||||
/* drop dentry, keep inode */
|
||||
atomic_inc(&path.dentry->d_inode->i_count);
|
||||
ihold(path.dentry->d_inode);
|
||||
path_put(&path);
|
||||
put_unused_fd(fd);
|
||||
return -ENFILE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue