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:
@ -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;
|
||||
|
Reference in New Issue
Block a user