diff options
Diffstat (limited to 'fs/reiserfs')
-rw-r--r-- | fs/reiserfs/ioctl.c | 7 | ||||
-rw-r--r-- | fs/reiserfs/xattr_acl.c | 6 |
2 files changed, 7 insertions, 6 deletions
diff --git a/fs/reiserfs/ioctl.c b/fs/reiserfs/ioctl.c index 5cbb81e134ac..4131f4a49391 100644 --- a/fs/reiserfs/ioctl.c +++ b/fs/reiserfs/ioctl.c | |||
@@ -186,12 +186,11 @@ int reiserfs_unpack(struct inode *inode, struct file *filp) | |||
186 | return 0; | 186 | return 0; |
187 | } | 187 | } |
188 | 188 | ||
189 | /* we need to make sure nobody is changing the file size beneath | ||
190 | ** us | ||
191 | */ | ||
192 | reiserfs_mutex_lock_safe(&inode->i_mutex, inode->i_sb); | ||
193 | depth = reiserfs_write_lock_once(inode->i_sb); | 189 | depth = reiserfs_write_lock_once(inode->i_sb); |
194 | 190 | ||
191 | /* we need to make sure nobody is changing the file size beneath us */ | ||
192 | reiserfs_mutex_lock_safe(&inode->i_mutex, inode->i_sb); | ||
193 | |||
195 | write_from = inode->i_size & (blocksize - 1); | 194 | write_from = inode->i_size & (blocksize - 1); |
196 | /* if we are on a block boundary, we are already unpacked. */ | 195 | /* if we are on a block boundary, we are already unpacked. */ |
197 | if (write_from == 0) { | 196 | if (write_from == 0) { |
diff --git a/fs/reiserfs/xattr_acl.c b/fs/reiserfs/xattr_acl.c index 536d697a8a28..90d2fcb67a31 100644 --- a/fs/reiserfs/xattr_acl.c +++ b/fs/reiserfs/xattr_acl.c | |||
@@ -472,7 +472,9 @@ int reiserfs_acl_chmod(struct inode *inode) | |||
472 | struct reiserfs_transaction_handle th; | 472 | struct reiserfs_transaction_handle th; |
473 | size_t size = reiserfs_xattr_nblocks(inode, | 473 | size_t size = reiserfs_xattr_nblocks(inode, |
474 | reiserfs_acl_size(clone->a_count)); | 474 | reiserfs_acl_size(clone->a_count)); |
475 | reiserfs_write_lock(inode->i_sb); | 475 | int depth; |
476 | |||
477 | depth = reiserfs_write_lock_once(inode->i_sb); | ||
476 | error = journal_begin(&th, inode->i_sb, size * 2); | 478 | error = journal_begin(&th, inode->i_sb, size * 2); |
477 | if (!error) { | 479 | if (!error) { |
478 | int error2; | 480 | int error2; |
@@ -482,7 +484,7 @@ int reiserfs_acl_chmod(struct inode *inode) | |||
482 | if (error2) | 484 | if (error2) |
483 | error = error2; | 485 | error = error2; |
484 | } | 486 | } |
485 | reiserfs_write_unlock(inode->i_sb); | 487 | reiserfs_write_unlock_once(inode->i_sb, depth); |
486 | } | 488 | } |
487 | posix_acl_release(clone); | 489 | posix_acl_release(clone); |
488 | return error; | 490 | return error; |