diff options
Diffstat (limited to 'fs/ext2/inode.c')
-rw-r--r-- | fs/ext2/inode.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index fc13cc119aad..527c46d9bc1f 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/inode.c | |||
@@ -22,7 +22,6 @@ | |||
22 | * Assorted race fixes, rewrite of ext2_get_block() by Al Viro, 2000 | 22 | * Assorted race fixes, rewrite of ext2_get_block() by Al Viro, 2000 |
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/smp_lock.h> | ||
26 | #include <linux/time.h> | 25 | #include <linux/time.h> |
27 | #include <linux/highuid.h> | 26 | #include <linux/highuid.h> |
28 | #include <linux/pagemap.h> | 27 | #include <linux/pagemap.h> |
@@ -1406,11 +1405,11 @@ static int __ext2_write_inode(struct inode *inode, int do_sync) | |||
1406 | /* If this is the first large file | 1405 | /* If this is the first large file |
1407 | * created, add a flag to the superblock. | 1406 | * created, add a flag to the superblock. |
1408 | */ | 1407 | */ |
1409 | lock_kernel(); | 1408 | spin_lock(&EXT2_SB(sb)->s_lock); |
1410 | ext2_update_dynamic_rev(sb); | 1409 | ext2_update_dynamic_rev(sb); |
1411 | EXT2_SET_RO_COMPAT_FEATURE(sb, | 1410 | EXT2_SET_RO_COMPAT_FEATURE(sb, |
1412 | EXT2_FEATURE_RO_COMPAT_LARGE_FILE); | 1411 | EXT2_FEATURE_RO_COMPAT_LARGE_FILE); |
1413 | unlock_kernel(); | 1412 | spin_unlock(&EXT2_SB(sb)->s_lock); |
1414 | ext2_write_super(sb); | 1413 | ext2_write_super(sb); |
1415 | } | 1414 | } |
1416 | } | 1415 | } |
@@ -1467,7 +1466,7 @@ int ext2_setattr(struct dentry *dentry, struct iattr *iattr) | |||
1467 | if (error) | 1466 | if (error) |
1468 | return error; | 1467 | return error; |
1469 | 1468 | ||
1470 | if (iattr->ia_valid & ATTR_SIZE) | 1469 | if (is_quota_modification(inode, iattr)) |
1471 | dquot_initialize(inode); | 1470 | dquot_initialize(inode); |
1472 | if ((iattr->ia_valid & ATTR_UID && iattr->ia_uid != inode->i_uid) || | 1471 | if ((iattr->ia_valid & ATTR_UID && iattr->ia_uid != inode->i_uid) || |
1473 | (iattr->ia_valid & ATTR_GID && iattr->ia_gid != inode->i_gid)) { | 1472 | (iattr->ia_valid & ATTR_GID && iattr->ia_gid != inode->i_gid)) { |