ncpfs: fix unused variable warning
authorMiklos Szeredi <mszeredi@redhat.com>
Tue, 27 Sep 2016 09:03:57 +0000 (11:03 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Tue, 27 Sep 2016 09:03:57 +0000 (11:03 +0200)
Without CONFIG_NCPFS_NLS the following warning is seen:

fs/ncpfs/dir.c: In function 'ncp_hash_dentry':
fs/ncpfs/dir.c:136:23: warning: unused variable 'sb' [-Wunused-variable]
   struct super_block *sb = dentry->d_sb;

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/ncpfs/dir.c

index 17de5c13dfaed943fd0f31bdb2d0647143dad375..f5b594e2457c3e469ae7cf4f3da3c593772a6150 100644 (file)
@@ -133,12 +133,11 @@ ncp_hash_dentry(const struct dentry *dentry, struct qstr *this)
                return 0;
 
        if (!ncp_case_sensitive(inode)) {
-               struct super_block *sb = dentry->d_sb;
                struct nls_table *t;
                unsigned long hash;
                int i;
 
-               t = NCP_IO_TABLE(sb);
+               t = NCP_IO_TABLE(dentry->d_sb);
                hash = init_name_hash(dentry);
                for (i=0; i<this->len ; i++)
                        hash = partial_name_hash(ncp_tolower(t, this->name[i]),