Commit 3bd404cf authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] inode_change_ok(): remove lock_kernel()

`attr' is on the stack, and the inode's contents can change as soon as we
return from inode_change_ok() anyway.  I can't see anything which is actually
being locked in there.
parent c94f7f38
......@@ -22,8 +22,6 @@ int inode_change_ok(struct inode *inode, struct iattr *attr)
int retval = -EPERM;
unsigned int ia_valid = attr->ia_valid;
lock_kernel();
/* If force is set do it anyway. */
if (ia_valid & ATTR_FORCE)
goto fine;
......@@ -58,7 +56,6 @@ int inode_change_ok(struct inode *inode, struct iattr *attr)
fine:
retval = 0;
error:
unlock_kernel();
return retval;
}
......
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