aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2012-04-25 15:24:30 -0400
committerJan Kara <jack@suse.cz>2012-05-15 17:34:37 -0400
commit905c3937625d14fa4453a2643814b72b8a22d9ae (patch)
tree5eb2a865b1a64c9b15d3e169bf20aac1f77a3373 /fs/ext3
parentd7e9711760a17aef3a94fc6dff4759fa5961de25 (diff)
ext3: Remove i_mutex use from ext3_quota_write()
We don't need i_mutex in ext3_quota_write() because writes to quota file are serialized by dqio_mutex anyway. Changes to quota files outside of quota code are forbidded and enforced by NOATIME and IMMUTABLE bits. Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext3')
-rw-r--r--fs/ext3/super.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/ext3/super.c b/fs/ext3/super.c
index cf0b5921cf0f..7c08c93bb615 100644
--- a/fs/ext3/super.c
+++ b/fs/ext3/super.c
@@ -3000,7 +3000,6 @@ static ssize_t ext3_quota_write(struct super_block *sb, int type,
3000 (unsigned long long)off, (unsigned long long)len); 3000 (unsigned long long)off, (unsigned long long)len);
3001 return -EIO; 3001 return -EIO;
3002 } 3002 }
3003 mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA);
3004 bh = ext3_bread(handle, inode, blk, 1, &err); 3003 bh = ext3_bread(handle, inode, blk, 1, &err);
3005 if (!bh) 3004 if (!bh)
3006 goto out; 3005 goto out;
@@ -3024,10 +3023,8 @@ static ssize_t ext3_quota_write(struct super_block *sb, int type,
3024 } 3023 }
3025 brelse(bh); 3024 brelse(bh);
3026out: 3025out:
3027 if (err) { 3026 if (err)
3028 mutex_unlock(&inode->i_mutex);
3029 return err; 3027 return err;
3030 }
3031 if (inode->i_size < off + len) { 3028 if (inode->i_size < off + len) {
3032 i_size_write(inode, off + len); 3029 i_size_write(inode, off + len);
3033 EXT3_I(inode)->i_disksize = inode->i_size; 3030 EXT3_I(inode)->i_disksize = inode->i_size;
@@ -3035,7 +3032,6 @@ out:
3035 inode->i_version++; 3032 inode->i_version++;
3036 inode->i_mtime = inode->i_ctime = CURRENT_TIME; 3033 inode->i_mtime = inode->i_ctime = CURRENT_TIME;
3037 ext3_mark_inode_dirty(handle, inode); 3034 ext3_mark_inode_dirty(handle, inode);
3038 mutex_unlock(&inode->i_mutex);
3039 return len; 3035 return len;
3040} 3036}
3041 3037