Commit 83ea848f authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] ->setattr() locking changes

ext3 was missed - the removal of the BKL in notify_change
means that the filesytem fails quite quickly on SMP in -pre2.
Sorry, I should have spotted that when the patch floated past.
parent 209502e1
...@@ -2377,6 +2377,8 @@ int ext3_setattr(struct dentry *dentry, struct iattr *attr) ...@@ -2377,6 +2377,8 @@ int ext3_setattr(struct dentry *dentry, struct iattr *attr)
return error; return error;
} }
lock_kernel();
if (attr->ia_valid & ATTR_SIZE && attr->ia_size < inode->i_size) { if (attr->ia_valid & ATTR_SIZE && attr->ia_size < inode->i_size) {
handle_t *handle; handle_t *handle;
...@@ -2404,6 +2406,7 @@ int ext3_setattr(struct dentry *dentry, struct iattr *attr) ...@@ -2404,6 +2406,7 @@ int ext3_setattr(struct dentry *dentry, struct iattr *attr)
err_out: err_out:
ext3_std_error(inode->i_sb, error); ext3_std_error(inode->i_sb, error);
unlock_kernel();
if (!error) if (!error)
error = rc; error = rc;
return error; return error;
......
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