mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
new helper: ihold()
Clones an existing reference to inode; caller must already hold one. Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
646ec4615c
commit
7de9c6ee3e
40 changed files with 57 additions and 49 deletions
|
|
@ -1580,7 +1580,7 @@ nfs_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry)
|
|||
d_drop(dentry);
|
||||
error = NFS_PROTO(dir)->link(inode, dir, &dentry->d_name);
|
||||
if (error == 0) {
|
||||
atomic_inc(&inode->i_count);
|
||||
ihold(inode);
|
||||
d_add(dentry, inode);
|
||||
}
|
||||
return error;
|
||||
|
|
|
|||
|
|
@ -54,8 +54,7 @@ static int nfs_superblock_set_dummy_root(struct super_block *sb, struct inode *i
|
|||
iput(inode);
|
||||
return -ENOMEM;
|
||||
}
|
||||
/* Circumvent igrab(): we know the inode is not being freed */
|
||||
atomic_inc(&inode->i_count);
|
||||
ihold(inode);
|
||||
/*
|
||||
* Ensure that this dentry is invisible to d_find_alias().
|
||||
* Otherwise, it may be spliced into the tree by
|
||||
|
|
|
|||
Loading…
Reference in a new issue