[-next] statfs: remove set but not used variable 'sb'
diff mbox series

Message ID 1533702942-166827-1-git-send-email-weiyongjun1@huawei.com
State New
Headers show
Series
  • [-next] statfs: remove set but not used variable 'sb'
Related show

Commit Message

Wei Yongjun Aug. 8, 2018, 4:35 a.m. UTC
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 <weiyongjun1@huawei.com>
---
 fs/statfs.c | 2 --
 1 file changed, 2 deletions(-)

Patch
diff mbox series

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;