* [ammarfaizi2-block:stable/linux-stable-rc/queue/5.18 29/879] fs/cifs/connect.c:3435:14: warning: unused variable 'nodfs'
@ 2022-06-08 23:13 kernel test robot
2022-06-09 4:48 ` [EXTERNAL] " Steven French
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2022-06-08 23:13 UTC (permalink / raw)
To: Enzo Matsumiya
Cc: kbuild-all, GNU/Weeb Mailing List, linux-kernel, Sasha Levin,
Paulo Alcantara (SUSE), Steve French, Greg Kroah-Hartman
tree: https://github.com/ammarfaizi2/linux-block stable/linux-stable-rc/queue/5.18
head: 7383156f95c8c7f7bda72abd7fa4d1bc06e2a8cf
commit: 98dd3927170845f16f5120686a0b5c5f181a3b87 [29/879] cifs: don't call cifs_dfs_query_info_nonascii_quirk() if nodfs was set
config: i386-randconfig-a001 (https://download.01.org/0day-ci/archive/20220609/[email protected]/config)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0
reproduce (this is a W=1 build):
# https://github.com/ammarfaizi2/linux-block/commit/98dd3927170845f16f5120686a0b5c5f181a3b87
git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
git fetch --no-tags ammarfaizi2-block stable/linux-stable-rc/queue/5.18
git checkout 98dd3927170845f16f5120686a0b5c5f181a3b87
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash fs/cifs/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>
All warnings (new ones prefixed by >>):
fs/cifs/connect.c: In function 'is_path_remote':
>> fs/cifs/connect.c:3435:14: warning: unused variable 'nodfs' [-Wunused-variable]
3435 | bool nodfs = cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_DFS;
| ^~~~~
vim +/nodfs +3435 fs/cifs/connect.c
3421
3422 /*
3423 * Check if path is remote (e.g. a DFS share). Return -EREMOTE if it is,
3424 * otherwise 0.
3425 */
3426 static int is_path_remote(struct mount_ctx *mnt_ctx)
3427 {
3428 int rc;
3429 struct cifs_sb_info *cifs_sb = mnt_ctx->cifs_sb;
3430 struct TCP_Server_Info *server = mnt_ctx->server;
3431 unsigned int xid = mnt_ctx->xid;
3432 struct cifs_tcon *tcon = mnt_ctx->tcon;
3433 struct smb3_fs_context *ctx = mnt_ctx->fs_ctx;
3434 char *full_path;
> 3435 bool nodfs = cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_DFS;
3436
3437 if (!server->ops->is_path_accessible)
3438 return -EOPNOTSUPP;
3439
3440 /*
3441 * cifs_build_path_to_root works only when we have a valid tcon
3442 */
3443 full_path = cifs_build_path_to_root(ctx, cifs_sb, tcon,
3444 tcon->Flags & SMB_SHARE_IS_IN_DFS);
3445 if (full_path == NULL)
3446 return -ENOMEM;
3447
3448 cifs_dbg(FYI, "%s: full_path: %s\n", __func__, full_path);
3449
3450 rc = server->ops->is_path_accessible(xid, tcon, cifs_sb,
3451 full_path);
3452 #ifdef CONFIG_CIFS_DFS_UPCALL
3453 if (nodfs) {
3454 if (rc == -EREMOTE)
3455 rc = -EOPNOTSUPP;
3456 goto out;
3457 }
3458
3459 /* path *might* exist with non-ASCII characters in DFS root
3460 * try again with full path (only if nodfs is not set) */
3461 if (rc == -ENOENT && is_tcon_dfs(tcon))
3462 rc = cifs_dfs_query_info_nonascii_quirk(xid, tcon, cifs_sb,
3463 full_path);
3464 #endif
3465 if (rc != 0 && rc != -EREMOTE)
3466 goto out;
3467
3468 if (rc != -EREMOTE) {
3469 rc = cifs_are_all_path_components_accessible(server, xid, tcon,
3470 cifs_sb, full_path, tcon->Flags & SMB_SHARE_IS_IN_DFS);
3471 if (rc != 0) {
3472 cifs_server_dbg(VFS, "cannot query dirs between root and final path, enabling CIFS_MOUNT_USE_PREFIX_PATH\n");
3473 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_USE_PREFIX_PATH;
3474 rc = 0;
3475 }
3476 }
3477
3478 out:
3479 kfree(full_path);
3480 return rc;
3481 }
3482
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 2+ messages in thread
* RE: [EXTERNAL] [ammarfaizi2-block:stable/linux-stable-rc/queue/5.18 29/879] fs/cifs/connect.c:3435:14: warning: unused variable 'nodfs'
2022-06-08 23:13 [ammarfaizi2-block:stable/linux-stable-rc/queue/5.18 29/879] fs/cifs/connect.c:3435:14: warning: unused variable 'nodfs' kernel test robot
@ 2022-06-09 4:48 ` Steven French
0 siblings, 0 replies; 2+ messages in thread
From: Steven French @ 2022-06-09 4:48 UTC (permalink / raw)
To: kernel test robot, Enzo Matsumiya (SUSE)
Cc: [email protected], GNU/Weeb Mailing List,
[email protected], Sasha Levin, pc, Greg Kroah-Hartman
This is harmless but the warning could be fixed by putting an ifdef around it as it has in mainline
#ifdef CONFIG_CIFS_DFS_UPCALL
bool nodfs = cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_DFS;
#endif /* CIFS_DFS_UPCALL */
-----Original Message-----
From: kernel test robot <[email protected]>
Sent: Wednesday, June 8, 2022 6:14 PM
To: Enzo Matsumiya (SUSE) <[email protected]>
Cc: [email protected]; GNU/Weeb Mailing List <[email protected]>; [email protected]; Sasha Levin <[email protected]>; pc <[email protected]>; Steven French <[email protected]>; Greg Kroah-Hartman <[email protected]>
Subject: [EXTERNAL] [ammarfaizi2-block:stable/linux-stable-rc/queue/5.18 29/879] fs/cifs/connect.c:3435:14: warning: unused variable 'nodfs'
tree: https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fammarfaizi2%2Flinux-block&data=05%7C01%7CSteven.French%40microsoft.com%7Cf194a361b31d41ce3c2408da49a4982e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637903268538948079%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=OZnPTVUJtqix0vvgtESHsrQ75l%2FmSmVVxyoEeiJXyg0%3D&reserved=0 stable/linux-stable-rc/queue/5.18
head: 7383156f95c8c7f7bda72abd7fa4d1bc06e2a8cf
commit: 98dd3927170845f16f5120686a0b5c5f181a3b87 [29/879] cifs: don't call cifs_dfs_query_info_nonascii_quirk() if nodfs was set
config: i386-randconfig-a001 (https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdownload.01.org%2F0day-ci%2Farchive%2F20220609%2F202206090711.ZJTiUk4L-lkp%40intel.com%2Fconfig&data=05%7C01%7CSteven.French%40microsoft.com%7Cf194a361b31d41ce3c2408da49a4982e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637903268538948079%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2B4snjNrlzx1nZsvHiLuu2o46PXM1iqWjxqkZiML5whk%3D&reserved=0)
compiler: gcc-11 (Debian 11.3.0-3) 11.3.0 reproduce (this is a W=1 build):
# https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fammarfaizi2%2Flinux-block%2Fcommit%2F98dd3927170845f16f5120686a0b5c5f181a3b87&data=05%7C01%7CSteven.French%40microsoft.com%7Cf194a361b31d41ce3c2408da49a4982e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637903268538948079%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=SsbQABrP7cEkQBU82%2BcC9NZDTs%2BxTrPbKkNRFRUgOLQ%3D&reserved=0
git remote add ammarfaizi2-block https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fammarfaizi2%2Flinux-block&data=05%7C01%7CSteven.French%40microsoft.com%7Cf194a361b31d41ce3c2408da49a4982e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637903268538948079%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=OZnPTVUJtqix0vvgtESHsrQ75l%2FmSmVVxyoEeiJXyg0%3D&reserved=0
git fetch --no-tags ammarfaizi2-block stable/linux-stable-rc/queue/5.18
git checkout 98dd3927170845f16f5120686a0b5c5f181a3b87
# save the config file
mkdir build_dir && cp config build_dir/.config
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash fs/cifs/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>
All warnings (new ones prefixed by >>):
fs/cifs/connect.c: In function 'is_path_remote':
>> fs/cifs/connect.c:3435:14: warning: unused variable 'nodfs'
>> [-Wunused-variable]
3435 | bool nodfs = cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_DFS;
| ^~~~~
vim +/nodfs +3435 fs/cifs/connect.c
3421
3422 /*
3423 * Check if path is remote (e.g. a DFS share). Return -EREMOTE if it is,
3424 * otherwise 0.
3425 */
3426 static int is_path_remote(struct mount_ctx *mnt_ctx)
3427 {
3428 int rc;
3429 struct cifs_sb_info *cifs_sb = mnt_ctx->cifs_sb;
3430 struct TCP_Server_Info *server = mnt_ctx->server;
3431 unsigned int xid = mnt_ctx->xid;
3432 struct cifs_tcon *tcon = mnt_ctx->tcon;
3433 struct smb3_fs_context *ctx = mnt_ctx->fs_ctx;
3434 char *full_path;
> 3435 bool nodfs = cifs_sb->mnt_cifs_flags & CIFS_MOUNT_NO_DFS;
3436
3437 if (!server->ops->is_path_accessible)
3438 return -EOPNOTSUPP;
3439
3440 /*
3441 * cifs_build_path_to_root works only when we have a valid tcon
3442 */
3443 full_path = cifs_build_path_to_root(ctx, cifs_sb, tcon,
3444 tcon->Flags & SMB_SHARE_IS_IN_DFS);
3445 if (full_path == NULL)
3446 return -ENOMEM;
3447
3448 cifs_dbg(FYI, "%s: full_path: %s\n", __func__, full_path);
3449
3450 rc = server->ops->is_path_accessible(xid, tcon, cifs_sb,
3451 full_path);
3452 #ifdef CONFIG_CIFS_DFS_UPCALL
3453 if (nodfs) {
3454 if (rc == -EREMOTE)
3455 rc = -EOPNOTSUPP;
3456 goto out;
3457 }
3458
3459 /* path *might* exist with non-ASCII characters in DFS root
3460 * try again with full path (only if nodfs is not set) */
3461 if (rc == -ENOENT && is_tcon_dfs(tcon))
3462 rc = cifs_dfs_query_info_nonascii_quirk(xid, tcon, cifs_sb,
3463 full_path);
3464 #endif
3465 if (rc != 0 && rc != -EREMOTE)
3466 goto out;
3467
3468 if (rc != -EREMOTE) {
3469 rc = cifs_are_all_path_components_accessible(server, xid, tcon,
3470 cifs_sb, full_path, tcon->Flags & SMB_SHARE_IS_IN_DFS);
3471 if (rc != 0) {
3472 cifs_server_dbg(VFS, "cannot query dirs between root and final path, enabling CIFS_MOUNT_USE_PREFIX_PATH\n");
3473 cifs_sb->mnt_cifs_flags |= CIFS_MOUNT_USE_PREFIX_PATH;
3474 rc = 0;
3475 }
3476 }
3477
3478 out:
3479 kfree(full_path);
3480 return rc;
3481 }
3482
--
0-DAY CI Kernel Test Service
https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2F01.org%2Flkp&data=05%7C01%7CSteven.French%40microsoft.com%7Cf194a361b31d41ce3c2408da49a4982e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637903268538948079%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=WQc%2B%2FV2lybHc4YtQ936Z9nKU1W6piwYGjW8d%2FJgRc58%3D&reserved=0
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-09 4:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-06-08 23:13 [ammarfaizi2-block:stable/linux-stable-rc/queue/5.18 29/879] fs/cifs/connect.c:3435:14: warning: unused variable 'nodfs' kernel test robot
2022-06-09 4:48 ` [EXTERNAL] " Steven French
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox