diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2010-10-23 11:11:40 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2010-10-25 21:26:11 -0400 |
commit | 7de9c6ee3ecffd99e1628e81a5ea5468f7581a1f (patch) | |
tree | 88787e77ba8a253d0a26aeda4bd5e58532d592e0 /fs/jffs2 | |
parent | 646ec4615cd05972581c9c5342ed7a1e77df17bb (diff) | |
download | blackbird-op-linux-7de9c6ee3ecffd99e1628e81a5ea5468f7581a1f.tar.gz blackbird-op-linux-7de9c6ee3ecffd99e1628e81a5ea5468f7581a1f.zip |
new helper: ihold()
Clones an existing reference to inode; caller must already hold one.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/jffs2')
-rw-r--r-- | fs/jffs2/dir.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/jffs2/dir.c b/fs/jffs2/dir.c index ed78a3cf3cb0..79121aa5858b 100644 --- a/fs/jffs2/dir.c +++ b/fs/jffs2/dir.c @@ -289,7 +289,7 @@ static int jffs2_link (struct dentry *old_dentry, struct inode *dir_i, struct de mutex_unlock(&f->sem); d_instantiate(dentry, old_dentry->d_inode); dir_i->i_mtime = dir_i->i_ctime = ITIME(now); - atomic_inc(&old_dentry->d_inode->i_count); + ihold(old_dentry->d_inode); } return ret; } @@ -864,7 +864,7 @@ static int jffs2_rename (struct inode *old_dir_i, struct dentry *old_dentry, printk(KERN_NOTICE "jffs2_rename(): Link succeeded, unlink failed (err %d). You now have a hard link\n", ret); /* Might as well let the VFS know */ d_instantiate(new_dentry, old_dentry->d_inode); - atomic_inc(&old_dentry->d_inode->i_count); + ihold(old_dentry->d_inode); new_dir_i->i_mtime = new_dir_i->i_ctime = ITIME(now); return ret; } |