summaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/ioctl.c
diff options
context:
space:
mode:
authorChris Mason2006-08-05 21:15:08 +0200
committerLinus Torvalds2006-08-06 17:57:49 +0200
commitb5f3953c10b27fcd1c83e199e573b41d8327e22e (patch)
treea7d3cafe3dbdfcfaa09de415bc46d3829c634bdb /fs/reiserfs/ioctl.c
parent[PATCH] memory hotadd fixes: enhance collision check (diff)
downloadkernel-qcow2-linux-b5f3953c10b27fcd1c83e199e573b41d8327e22e.tar.gz
kernel-qcow2-linux-b5f3953c10b27fcd1c83e199e573b41d8327e22e.tar.xz
kernel-qcow2-linux-b5f3953c10b27fcd1c83e199e573b41d8327e22e.zip
[PATCH] fix reiserfs lock inversion of bkl vs inode semaphore
The correct lock ordering is inode lock -> BKL Signed-off-by: Chris Mason <mason@suse.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/reiserfs/ioctl.c')
-rw-r--r--fs/reiserfs/ioctl.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/reiserfs/ioctl.c b/fs/reiserfs/ioctl.c
index 745c88100895..a986b5e1e288 100644
--- a/fs/reiserfs/ioctl.c
+++ b/fs/reiserfs/ioctl.c
@@ -116,12 +116,12 @@ static int reiserfs_unpack(struct inode *inode, struct file *filp)
if (REISERFS_I(inode)->i_flags & i_nopack_mask) {
return 0;
}
- reiserfs_write_lock(inode->i_sb);
/* we need to make sure nobody is changing the file size beneath
** us
*/
mutex_lock(&inode->i_mutex);
+ reiserfs_write_lock(inode->i_sb);
write_from = inode->i_size & (blocksize - 1);
/* if we are on a block boundary, we are already unpacked. */