diff options
Diffstat (limited to 'fs/reiserfs/file.c')
-rw-r--r-- | fs/reiserfs/file.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/reiserfs/file.c b/fs/reiserfs/file.c index 7892a865b58a..127e7d2cabdd 100644 --- a/fs/reiserfs/file.c +++ b/fs/reiserfs/file.c | |||
@@ -49,7 +49,7 @@ static int reiserfs_file_release(struct inode *inode, struct file *filp) | |||
49 | } | 49 | } |
50 | 50 | ||
51 | reiserfs_write_lock(inode->i_sb); | 51 | reiserfs_write_lock(inode->i_sb); |
52 | down(&inode->i_sem); | 52 | mutex_lock(&inode->i_mutex); |
53 | /* freeing preallocation only involves relogging blocks that | 53 | /* freeing preallocation only involves relogging blocks that |
54 | * are already in the current transaction. preallocation gets | 54 | * are already in the current transaction. preallocation gets |
55 | * freed at the end of each transaction, so it is impossible for | 55 | * freed at the end of each transaction, so it is impossible for |
@@ -100,7 +100,7 @@ static int reiserfs_file_release(struct inode *inode, struct file *filp) | |||
100 | err = reiserfs_truncate_file(inode, 0); | 100 | err = reiserfs_truncate_file(inode, 0); |
101 | } | 101 | } |
102 | out: | 102 | out: |
103 | up(&inode->i_sem); | 103 | mutex_unlock(&inode->i_mutex); |
104 | reiserfs_write_unlock(inode->i_sb); | 104 | reiserfs_write_unlock(inode->i_sb); |
105 | return err; | 105 | return err; |
106 | } | 106 | } |
@@ -1342,7 +1342,7 @@ static ssize_t reiserfs_file_write(struct file *file, /* the file we are going t | |||
1342 | if (unlikely(!access_ok(VERIFY_READ, buf, count))) | 1342 | if (unlikely(!access_ok(VERIFY_READ, buf, count))) |
1343 | return -EFAULT; | 1343 | return -EFAULT; |
1344 | 1344 | ||
1345 | down(&inode->i_sem); // locks the entire file for just us | 1345 | mutex_lock(&inode->i_mutex); // locks the entire file for just us |
1346 | 1346 | ||
1347 | pos = *ppos; | 1347 | pos = *ppos; |
1348 | 1348 | ||
@@ -1532,12 +1532,12 @@ static ssize_t reiserfs_file_write(struct file *file, /* the file we are going t | |||
1532 | generic_osync_inode(inode, file->f_mapping, | 1532 | generic_osync_inode(inode, file->f_mapping, |
1533 | OSYNC_METADATA | OSYNC_DATA); | 1533 | OSYNC_METADATA | OSYNC_DATA); |
1534 | 1534 | ||
1535 | up(&inode->i_sem); | 1535 | mutex_unlock(&inode->i_mutex); |
1536 | reiserfs_async_progress_wait(inode->i_sb); | 1536 | reiserfs_async_progress_wait(inode->i_sb); |
1537 | return (already_written != 0) ? already_written : res; | 1537 | return (already_written != 0) ? already_written : res; |
1538 | 1538 | ||
1539 | out: | 1539 | out: |
1540 | up(&inode->i_sem); // unlock the file on exit. | 1540 | mutex_unlock(&inode->i_mutex); // unlock the file on exit. |
1541 | return res; | 1541 | return res; |
1542 | } | 1542 | } |
1543 | 1543 | ||