aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2012-04-25 15:28:12 -0400
committerJan Kara <jack@suse.cz>2012-05-15 17:34:38 -0400
commit67f1648d217c3b8165ca114c7838164f31e15790 (patch)
tree9c9fcd9dce9d7c3a1ad7863a4cdcbcf5ec235924 /fs/reiserfs
parent0b7f7cefaea96ef25dbe54b8e16d2d61560d8b9d (diff)
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')
-rw-r--r--fs/reiserfs/super.c6
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,
2270 (unsigned long long)off, (unsigned long long)len); 2270 (unsigned long long)off, (unsigned long long)len);
2271 return -EIO; 2271 return -EIO;
2272 } 2272 }
2273 mutex_lock_nested(&inode->i_mutex, I_MUTEX_QUOTA);
2274 while (towrite > 0) { 2273 while (towrite > 0) {
2275 tocopy = sb->s_blocksize - offset < towrite ? 2274 tocopy = sb->s_blocksize - offset < towrite ?
2276 sb->s_blocksize - offset : towrite; 2275 sb->s_blocksize - offset : towrite;
@@ -2302,16 +2301,13 @@ static ssize_t reiserfs_quota_write(struct super_block *sb, int type,
2302 blk++; 2301 blk++;
2303 } 2302 }
2304out: 2303out:
2305 if (len == towrite) { 2304 if (len == towrite)
2306 mutex_unlock(&inode->i_mutex);
2307 return err; 2305 return err;
2308 }
2309 if (inode->i_size < off + len - towrite) 2306 if (inode->i_size < off + len - towrite)
2310 i_size_write(inode, off + len - towrite); 2307 i_size_write(inode, off + len - towrite);
2311 inode->i_version++; 2308 inode->i_version++;
2312 inode->i_mtime = inode->i_ctime = CURRENT_TIME; 2309 inode->i_mtime = inode->i_ctime = CURRENT_TIME;
2313 mark_inode_dirty(inode); 2310 mark_inode_dirty(inode);
2314 mutex_unlock(&inode->i_mutex);
2315 return len - towrite; 2311 return len - towrite;
2316} 2312}
2317 2313