Commit 3493e0ab authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] speed up the unlink speedup

I'm not sure why I used igrab() in unlink().  igrab takes the oft-taken
inode_lock.

The caller has a ref, so a simple increment of i_count will suffice.
parent 6d01cc49
...@@ -1671,7 +1671,7 @@ asmlinkage long sys_unlink(const char __user * pathname) ...@@ -1671,7 +1671,7 @@ asmlinkage long sys_unlink(const char __user * pathname)
goto slashes; goto slashes;
inode = dentry->d_inode; inode = dentry->d_inode;
if (inode) if (inode)
inode = igrab(inode); atomic_inc(&inode->i_count);
error = vfs_unlink(nd.dentry->d_inode, dentry); error = vfs_unlink(nd.dentry->d_inode, dentry);
exit2: exit2:
dput(dentry); dput(dentry);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment