linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] sysv: return 'err' instead of 0 in __sysv_write_inode
@ 2018-11-10  4:13 YueHaibing
  2018-11-10  8:32 ` Christoph Hellwig
  2018-11-10 13:03 ` Al Viro
  0 siblings, 2 replies; 3+ messages in thread
From: YueHaibing @ 2018-11-10  4:13 UTC (permalink / raw)
  To: Christoph Hellwig, David Howells, Arnd Bergmann, Al Viro
  Cc: YueHaibing, linux-kernel, kernel-janitors

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>
---
 fs/sysv/inode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/sysv/inode.c b/fs/sysv/inode.c
index 499a20a..273736f 100644
--- a/fs/sysv/inode.c
+++ b/fs/sysv/inode.c
@@ -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)




^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] sysv: return 'err' instead of 0 in __sysv_write_inode
  2018-11-10  4:13 [PATCH -next] sysv: return 'err' instead of 0 in __sysv_write_inode YueHaibing
@ 2018-11-10  8:32 ` Christoph Hellwig
  2018-11-10 13:03 ` Al Viro
  1 sibling, 0 replies; 3+ messages in thread
From: Christoph Hellwig @ 2018-11-10  8:32 UTC (permalink / raw)
  To: YueHaibing
  Cc: Christoph Hellwig, David Howells, Arnd Bergmann, Al Viro,
	linux-kernel, kernel-janitors

Looks fine:

Reviewed-by: Christoph Hellwig <hch@lst.de>

Al, can you queue it up?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] sysv: return 'err' instead of 0 in __sysv_write_inode
  2018-11-10  4:13 [PATCH -next] sysv: return 'err' instead of 0 in __sysv_write_inode YueHaibing
  2018-11-10  8:32 ` Christoph Hellwig
@ 2018-11-10 13:03 ` Al Viro
  1 sibling, 0 replies; 3+ messages in thread
From: Al Viro @ 2018-11-10 13:03 UTC (permalink / raw)
  To: YueHaibing
  Cc: Christoph Hellwig, David Howells, Arnd Bergmann, linux-kernel,
	kernel-janitors

On Sat, Nov 10, 2018 at 04:13:24AM +0000, YueHaibing wrote:
> 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>

Applied.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-11-10 13:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-10  4:13 [PATCH -next] sysv: return 'err' instead of 0 in __sysv_write_inode YueHaibing
2018-11-10  8:32 ` Christoph Hellwig
2018-11-10 13:03 ` Al Viro

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).