diff options
author | Jan Kara <jack@suse.cz> | 2012-04-25 15:26:54 -0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2012-05-15 17:34:38 -0400 |
commit | 0b7f7cefaea96ef25dbe54b8e16d2d61560d8b9d (patch) | |
tree | 640e7107056b7cc5cf06b1c03ba569bd241b6c31 /fs/ext4 | |
parent | 905c3937625d14fa4453a2643814b72b8a22d9ae (diff) |
ext4: Remove i_mutex use from ext4_quota_write()
We don't need i_mutex in ext4_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/ext4')
-rw-r--r-- | fs/ext4/super.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index ceebaf853beb..97938db9f39d 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -4760,7 +4760,6 @@ static ssize_t ext4_quota_write(struct super_block *sb, int type, | |||
4760 | return -EIO; | 4760 | return -EIO; |
4761 | } | 4761 | } |
4762 | 4762 | ||
4763 | mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA); | ||
4764 | bh = ext4_bread(handle, inode, blk, 1, &err); | 4763 | bh = ext4_bread(handle, inode, blk, 1, &err); |
4765 | if (!bh) | 4764 | if (!bh) |
4766 | goto out; | 4765 | goto out; |
@@ -4776,16 +4775,13 @@ static ssize_t ext4_quota_write(struct super_block *sb, int type, | |||
4776 | err = ext4_handle_dirty_metadata(handle, NULL, bh); | 4775 | err = ext4_handle_dirty_metadata(handle, NULL, bh); |
4777 | brelse(bh); | 4776 | brelse(bh); |
4778 | out: | 4777 | out: |
4779 | if (err) { | 4778 | if (err) |
4780 | mutex_unlock(&inode->i_mutex); | ||
4781 | return err; | 4779 | return err; |
4782 | } | ||
4783 | if (inode->i_size < off + len) { | 4780 | if (inode->i_size < off + len) { |
4784 | i_size_write(inode, off + len); | 4781 | i_size_write(inode, off + len); |
4785 | EXT4_I(inode)->i_disksize = inode->i_size; | 4782 | EXT4_I(inode)->i_disksize = inode->i_size; |
4786 | ext4_mark_inode_dirty(handle, inode); | 4783 | ext4_mark_inode_dirty(handle, inode); |
4787 | } | 4784 | } |
4788 | mutex_unlock(&inode->i_mutex); | ||
4789 | return len; | 4785 | return len; |
4790 | } | 4786 | } |
4791 | 4787 | ||