diff options
Diffstat (limited to 'fs/ufs')
-rw-r--r-- | fs/ufs/super.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/ufs/super.c b/fs/ufs/super.c index 2ba11a9aa995..e9a42c711a9e 100644 --- a/fs/ufs/super.c +++ b/fs/ufs/super.c | |||
@@ -1275,7 +1275,7 @@ static ssize_t ufs_quota_write(struct super_block *sb, int type, | |||
1275 | size_t towrite = len; | 1275 | size_t towrite = len; |
1276 | struct buffer_head *bh; | 1276 | struct buffer_head *bh; |
1277 | 1277 | ||
1278 | down(&inode->i_sem); | 1278 | mutex_lock(&inode->i_mutex); |
1279 | while (towrite > 0) { | 1279 | while (towrite > 0) { |
1280 | tocopy = sb->s_blocksize - offset < towrite ? | 1280 | tocopy = sb->s_blocksize - offset < towrite ? |
1281 | sb->s_blocksize - offset : towrite; | 1281 | sb->s_blocksize - offset : towrite; |
@@ -1297,7 +1297,7 @@ static ssize_t ufs_quota_write(struct super_block *sb, int type, | |||
1297 | } | 1297 | } |
1298 | out: | 1298 | out: |
1299 | if (len == towrite) { | 1299 | if (len == towrite) { |
1300 | up(&inode->i_sem); | 1300 | mutex_unlock(&inode->i_mutex); |
1301 | return err; | 1301 | return err; |
1302 | } | 1302 | } |
1303 | if (inode->i_size < off+len-towrite) | 1303 | if (inode->i_size < off+len-towrite) |
@@ -1305,7 +1305,7 @@ out: | |||
1305 | inode->i_version++; | 1305 | inode->i_version++; |
1306 | inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC; | 1306 | inode->i_mtime = inode->i_ctime = CURRENT_TIME_SEC; |
1307 | mark_inode_dirty(inode); | 1307 | mark_inode_dirty(inode); |
1308 | up(&inode->i_sem); | 1308 | mutex_unlock(&inode->i_mutex); |
1309 | return len - towrite; | 1309 | return len - towrite; |
1310 | } | 1310 | } |
1311 | 1311 | ||