Re: [WTF] ->setattr() locking changes

Andrew Morton (akpm@zip.com.au)
Sat, 06 Apr 2002 00:10:55 -0800


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.

Please do it this way:

--- linux-2.5.8-pre2/fs/ext3/inode.c Fri Apr 5 17:42:19 2002
+++ 25/fs/ext3/inode.c Fri Apr 5 22:04:47 2002
@@ -2377,6 +2377,8 @@ int ext3_setattr(struct dentry *dentry,
return error;
}

+ lock_kernel();
+
if (attr->ia_valid & ATTR_SIZE && attr->ia_size < inode->i_size) {
handle_t *handle;

@@ -2404,6 +2406,7 @@ int ext3_setattr(struct dentry *dentry,

err_out:
ext3_std_error(inode->i_sb, error);
+ unlock_kernel();
if (!error)
error = rc;
return error;

-
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/