sysv: return 'err' instead of 0 in __sysv_write_inode
authorYueHaibing <yuehaibing@huawei.com>
Sat, 10 Nov 2018 04:13:24 +0000 (04:13 +0000)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 10 Nov 2018 13:02:40 +0000 (08:02 -0500)
Fixes gcc '-Wunused-but-set-variable' warning:

fs/sysv/inode.c: In function '__sysv_write_inode':
fs/sysv/inode.c:239:6: warning:
 variable 'err' set but not used [-Wunused-but-set-variable]

__sysv_write_inode should return 'err' instead of 0

Fixes: 05459ca81ac3 ("repair sysv_write_inode(), switch sysv to simple_fsync()")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/sysv/inode.c

index 499a20a5a0107f3ca8942485a7a5b3bc58737793..273736f41be386c9f466c5512bd395732fade3aa 100644 (file)
@@ -275,7 +275,7 @@ static int __sysv_write_inode(struct inode *inode, int wait)
                 }
         }
        brelse(bh);
-       return 0;
+       return err;
 }
 
 int sysv_write_inode(struct inode *inode, struct writeback_control *wbc)