archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] statfs: remove set but not used variable 'sb'
@ 2018-08-08  4:35 Wei Yongjun
  0 siblings, 0 replies; only message in thread
From: Wei Yongjun @ 2018-08-08  4:35 UTC (permalink / raw)
  To: Alexander Viro, David Howells; +Cc: Wei Yongjun, linux-fsdevel, kernel-janitors

Fixes gcc '-Wunused-but-set-variable' warning:

fs/statfs.c: In function 'fsinfo_generic_statfs':
fs/statfs.c:406:22: warning:
 variable 'sb' set but not used [-Wunused-but-set-variable]
  struct super_block *sb;

Fixes: 90b413cb970a ("vfs: syscall: Add fsinfo() to query filesystem information")
Signed-off-by: Wei Yongjun <>
 fs/statfs.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/statfs.c b/fs/statfs.c
index 2f3f2d5..f714f05 100644
--- a/fs/statfs.c
+++ b/fs/statfs.c
@@ -403,7 +403,6 @@ int kcompat_sys_fstatfs64(unsigned int fd, compat_size_t sz, struct compat_statf
 static int fsinfo_generic_statfs(struct dentry *dentry,
 				 struct fsinfo_statfs *p)
-	struct super_block *sb;
 	struct kstatfs buf;
 	int ret;
@@ -411,7 +410,6 @@ static int fsinfo_generic_statfs(struct dentry *dentry,
 	if (ret < 0)
 		return ret;
-	sb = dentry->d_sb;
 	p->f_blocks	= buf.f_blocks;
 	p->f_bfree	= buf.f_bfree;
 	p->f_bavail	= buf.f_bavail;

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-08-08  6:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-08-08  4:35 [PATCH -next] statfs: remove set but not used variable 'sb' Wei Yongjun

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).