diff options
author | Jan Kara <jack@suse.cz> | 2012-04-25 23:28:12 +0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2012-05-16 01:34:38 +0400 |
commit | 67f1648d217c3b8165ca114c7838164f31e15790 (patch) | |
tree | 9c9fcd9dce9d7c3a1ad7863a4cdcbcf5ec235924 /fs/reiserfs/super.c | |
parent | 0b7f7cefaea96ef25dbe54b8e16d2d61560d8b9d (diff) | |
download | linux-67f1648d217c3b8165ca114c7838164f31e15790.tar.xz |
reiserfs: Remove i_mutex use from reiserfs_quota_write()
We don't need i_mutex in reiserfs_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/reiserfs/super.c')
-rw-r--r-- | fs/reiserfs/super.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/fs/reiserfs/super.c b/fs/reiserfs/super.c index 8b7616ef06d8..c07b7d709447 100644 --- a/fs/reiserfs/super.c +++ b/fs/reiserfs/super.c @@ -2270,7 +2270,6 @@ static ssize_t reiserfs_quota_write(struct super_block *sb, int type, (unsigned long long)off, (unsigned long long)len); return -EIO; } - mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA); while (towrite > 0) { tocopy = sb->s_blocksize - offset < towrite ? sb->s_blocksize - offset : towrite; @@ -2302,16 +2301,13 @@ static ssize_t reiserfs_quota_write(struct super_block *sb, int type, blk++; } out: - if (len == towrite) { - mutex_unlock(&inode->i_mutex); + if (len == towrite) return err; - } if (inode->i_size < off + len - towrite) i_size_write(inode, off + len - towrite); inode->i_version++; inode->i_mtime = inode->i_ctime = CURRENT_TIME; mark_inode_dirty(inode); - mutex_unlock(&inode->i_mutex); return len - towrite; } |