]> git.hungrycats.org Git - linux/commitdiff
[PATCH] ->setattr() locking changes
authorAndrew Morton <akpm@zip.com.au>
Sat, 6 Apr 2002 00:32:52 +0000 (16:32 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Sat, 6 Apr 2002 00:32:52 +0000 (16:32 -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.

fs/ext3/inode.c

index ac026401ed9da4a2d5c11fc4ce13a874ca9950d6..86e37917c0fe2228709d2771f3d79fe30f938062 100644 (file)
@@ -2377,6 +2377,8 @@ int ext3_setattr(struct dentry *dentry, struct iattr *attr)
                        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, struct iattr *attr)
 
 err_out:
        ext3_std_error(inode->i_sb, error);
+       unlock_kernel();
        if (!error)
                error = rc;
        return error;