diff options
Diffstat (limited to 'fs/reiserfs/ioctl.c')
-rw-r--r-- | fs/reiserfs/ioctl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/reiserfs/ioctl.c b/fs/reiserfs/ioctl.c index 81fc00285f60..745c88100895 100644 --- a/fs/reiserfs/ioctl.c +++ b/fs/reiserfs/ioctl.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README | 2 | * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README |
3 | */ | 3 | */ |
4 | 4 | ||
5 | #include <linux/capability.h> | ||
5 | #include <linux/fs.h> | 6 | #include <linux/fs.h> |
6 | #include <linux/reiserfs_fs.h> | 7 | #include <linux/reiserfs_fs.h> |
7 | #include <linux/time.h> | 8 | #include <linux/time.h> |
@@ -120,7 +121,7 @@ static int reiserfs_unpack(struct inode *inode, struct file *filp) | |||
120 | /* we need to make sure nobody is changing the file size beneath | 121 | /* we need to make sure nobody is changing the file size beneath |
121 | ** us | 122 | ** us |
122 | */ | 123 | */ |
123 | down(&inode->i_sem); | 124 | mutex_lock(&inode->i_mutex); |
124 | 125 | ||
125 | write_from = inode->i_size & (blocksize - 1); | 126 | write_from = inode->i_size & (blocksize - 1); |
126 | /* if we are on a block boundary, we are already unpacked. */ | 127 | /* if we are on a block boundary, we are already unpacked. */ |
@@ -156,7 +157,7 @@ static int reiserfs_unpack(struct inode *inode, struct file *filp) | |||
156 | page_cache_release(page); | 157 | page_cache_release(page); |
157 | 158 | ||
158 | out: | 159 | out: |
159 | up(&inode->i_sem); | 160 | mutex_unlock(&inode->i_mutex); |
160 | reiserfs_write_unlock(inode->i_sb); | 161 | reiserfs_write_unlock(inode->i_sb); |
161 | return retval; | 162 | return retval; |
162 | } | 163 | } |