aboutsummaryrefslogtreecommitdiffstats
path: root/fs/reiserfs/inode.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/reiserfs/inode.c')
-rw-r--r--fs/reiserfs/inode.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/reiserfs/inode.c b/fs/reiserfs/inode.c
index bd615dfe4ec7..47dbfb18877a 100644
--- a/fs/reiserfs/inode.c
+++ b/fs/reiserfs/inode.c
@@ -3052,13 +3052,14 @@ static ssize_t reiserfs_direct_IO(int rw, struct kiocb *iocb,
3052int reiserfs_setattr(struct dentry *dentry, struct iattr *attr) 3052int reiserfs_setattr(struct dentry *dentry, struct iattr *attr)
3053{ 3053{
3054 struct inode *inode = dentry->d_inode; 3054 struct inode *inode = dentry->d_inode;
3055 int error;
3056 unsigned int ia_valid; 3055 unsigned int ia_valid;
3056 int depth;
3057 int error;
3057 3058
3058 /* must be turned off for recursive notify_change calls */ 3059 /* must be turned off for recursive notify_change calls */
3059 ia_valid = attr->ia_valid &= ~(ATTR_KILL_SUID|ATTR_KILL_SGID); 3060 ia_valid = attr->ia_valid &= ~(ATTR_KILL_SUID|ATTR_KILL_SGID);
3060 3061
3061 reiserfs_write_lock(inode->i_sb); 3062 depth = reiserfs_write_lock_once(inode->i_sb);
3062 if (attr->ia_valid & ATTR_SIZE) { 3063 if (attr->ia_valid & ATTR_SIZE) {
3063 /* version 2 items will be caught by the s_maxbytes check 3064 /* version 2 items will be caught by the s_maxbytes check
3064 ** done for us in vmtruncate 3065 ** done for us in vmtruncate
@@ -3149,7 +3150,8 @@ int reiserfs_setattr(struct dentry *dentry, struct iattr *attr)
3149 } 3150 }
3150 3151
3151 out: 3152 out:
3152 reiserfs_write_unlock(inode->i_sb); 3153 reiserfs_write_unlock_once(inode->i_sb, depth);
3154
3153 return error; 3155 return error;
3154} 3156}
3155 3157