diff options
author | Jan Kara <jack@suse.cz> | 2013-08-09 10:49:58 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2013-08-09 10:49:58 +0200 |
commit | 97a2847d064e2fdd2e3cd4ff14cad2f377f0677a (patch) | |
tree | e49ce105dc6febc25dc3ceba6070ea3998c7330c /fs/reiserfs/ioctl.c | |
parent | e99a03c6f50a699d63b5751e3e88f84e43b037a7 (diff) | |
parent | d2d0395fd1778d4bf714adc5bfd23a5d748d7802 (diff) | |
download | linux-97a2847d064e2fdd2e3cd4ff14cad2f377f0677a.tar.bz2 |
Merge branch 'for-3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/jeffm/linux-reiserfs into for_next_testing
Reiserfs locking fixes.
Diffstat (limited to 'fs/reiserfs/ioctl.c')
-rw-r--r-- | fs/reiserfs/ioctl.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/reiserfs/ioctl.c b/fs/reiserfs/ioctl.c index 15cb5fe6b425..946ccbf5b5a1 100644 --- a/fs/reiserfs/ioctl.c +++ b/fs/reiserfs/ioctl.c @@ -167,7 +167,6 @@ int reiserfs_commit_write(struct file *f, struct page *page, int reiserfs_unpack(struct inode *inode, struct file *filp) { int retval = 0; - int depth; int index; struct page *page; struct address_space *mapping; @@ -183,11 +182,11 @@ int reiserfs_unpack(struct inode *inode, struct file *filp) return 0; } - depth = reiserfs_write_lock_once(inode->i_sb); - /* we need to make sure nobody is changing the file size beneath us */ reiserfs_mutex_lock_safe(&inode->i_mutex, inode->i_sb); + reiserfs_write_lock(inode->i_sb); + write_from = inode->i_size & (blocksize - 1); /* if we are on a block boundary, we are already unpacked. */ if (write_from == 0) { @@ -221,6 +220,6 @@ int reiserfs_unpack(struct inode *inode, struct file *filp) out: mutex_unlock(&inode->i_mutex); - reiserfs_write_unlock_once(inode->i_sb, depth); + reiserfs_write_unlock(inode->i_sb); return retval; } |