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 81fc002..745c881 100644 --- a/fs/reiserfs/ioctl.c +++ b/fs/reiserfs/ioctl.c @@ -2,6 +2,7 @@ * Copyright 2000 by Hans Reiser, licensing governed by reiserfs/README */ +#include <linux/capability.h> #include <linux/fs.h> #include <linux/reiserfs_fs.h> #include <linux/time.h> @@ -120,7 +121,7 @@ static int reiserfs_unpack(struct inode *inode, struct file *filp) /* we need to make sure nobody is changing the file size beneath ** us */ - down(&inode->i_sem); + mutex_lock(&inode->i_mutex); write_from = inode->i_size & (blocksize - 1); /* 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) page_cache_release(page); out: - up(&inode->i_sem); + mutex_unlock(&inode->i_mutex); reiserfs_write_unlock(inode->i_sb); return retval; } |