Skip to content

Commit 1368f15

Browse files
arndbsmfrench
authored andcommitted
cifs: hide unused functions
The newly added SMB2+ attribute support causes unused function warnings when CONFIG_CIFS_XATTR is disabled: fs/cifs/smb2ops.c:563:1: error: 'smb2_set_ea' defined but not used [-Werror=unused-function] smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon, fs/cifs/smb2ops.c:513:1: error: 'smb2_query_eas' defined but not used [-Werror=unused-function] smb2_query_eas(const unsigned int xid, struct cifs_tcon *tcon, This adds another #ifdef around the affected functions. Fixes: 5517554 ("cifs: Add support for writing attributes on SMB2+") Fixes: 95907fe ("cifs: Add support for reading attributes on SMB2+") Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent 9764c02 commit 1368f15

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

fs/cifs/smb2ops.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,7 @@ smb2_query_file_info(const unsigned int xid, struct cifs_tcon *tcon,
426426
return rc;
427427
}
428428

429+
#ifdef CONFIG_CIFS_XATTR
429430
static ssize_t
430431
move_smb2_ea_to_cifs(char *dst, size_t dst_size,
431432
struct smb2_file_full_ea_info *src, size_t src_size,
@@ -613,6 +614,7 @@ smb2_set_ea(const unsigned int xid, struct cifs_tcon *tcon,
613614

614615
return rc;
615616
}
617+
#endif
616618

617619
static bool
618620
smb2_can_echo(struct TCP_Server_Info *server)

0 commit comments

Comments
 (0)