]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ext4: fix return value of ext4_do_update_inode
authorLi Xi <pkuelelixi@gmail.com>
Thu, 2 Oct 2014 02:11:06 +0000 (22:11 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 2 Oct 2014 02:11:06 +0000 (22:11 -0400)
When ext4_do_update_inode() gets error from ext4_inode_blocks_set(),
error number should be returned.

Signed-off-by: Li Xi <lixi@ddn.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Jan Kara <jack@suse.cz>
fs/ext4/inode.c

index 091845298f482d735e9af490b24bd521b1a35cf2..41c4f97c39d3214f294ee5196319db9c8e08d6d7 100644 (file)
@@ -4204,7 +4204,8 @@ static int ext4_do_update_inode(handle_t *handle,
        EXT4_INODE_SET_XTIME(i_atime, inode, raw_inode);
        EXT4_EINODE_SET_XTIME(i_crtime, ei, raw_inode);
 
-       if (ext4_inode_blocks_set(handle, raw_inode, ei)) {
+       err = ext4_inode_blocks_set(handle, raw_inode, ei);
+       if (err) {
                spin_unlock(&ei->i_raw_lock);
                goto out_brelse;
        }