From 51e5c0e80baf98043d181a376af1b4c1fb368c32 Mon Sep 17 00:00:00 2001 From: Shaun Tancheff Date: Fri, 11 Apr 2025 08:39:43 +0700 Subject: [PATCH] LU-18906 build: page_cache_alloc removed, missing return Fix gcc -Wreturn-type nrs_orr.c:1680:1: error: control reaches end of non-void \ function [-Werror=return-type] Fix gcc -Wimplicit-function-declaration file.c:678:24: error: implicit declaration of function \ page_cache_alloc [-Werror=implicit-function-declaration] nodemap_idx_cluster_roles_modify() needs to be static to avoid error: no previous prototype for 'nodemap_idx_cluster_roles_modify' \ [-Werror=missing-prototypes] Test-Parameters: trivial Fixes: f7b1fea6bff ("LU-16518 lustre: fix implicit-fallthrough warnings") Fixes: 4a14a51a8e0 ("LU-18448 llite: read dir on open") Fixes: 904a7f1e839 ("LU-17431 nodemap: introduce child_raise_privileges property") Signed-off-by: Shaun Tancheff Change-Id: I6d5131748efc7d7fcc51c4dc3b06070057cb0f0e Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58724 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Timothy Day Reviewed-by: Robert Read Reviewed-by: James Simmons Reviewed-by: Oleg Drokin --- lustre/llite/file.c | 2 +- lustre/ptlrpc/nodemap_handler.c | 1 + lustre/ptlrpc/nrs_orr.c | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lustre/llite/file.c b/lustre/llite/file.c index 57cab07..b3163cb 100644 --- a/lustre/llite/file.c +++ b/lustre/llite/file.c @@ -675,7 +675,7 @@ void ll_dir_finish_open(struct inode *inode, struct ptlrpc_request *req) is_hash64 = test_bit(LL_SBI_64BIT_HASH, ll_i2sbi(inode)->ll_flags); for (i = 0; i < npages; i++) { - page = page_cache_alloc(inode->i_mapping); + page = __page_cache_alloc(mapping_gfp_mask(inode->i_mapping)); if (!page) continue; diff --git a/lustre/ptlrpc/nodemap_handler.c b/lustre/ptlrpc/nodemap_handler.c index dbd7376..e8a70e5 100644 --- a/lustre/ptlrpc/nodemap_handler.c +++ b/lustre/ptlrpc/nodemap_handler.c @@ -1887,6 +1887,7 @@ out: } EXPORT_SYMBOL(nodemap_set_mapping_mode); +static int nodemap_idx_cluster_roles_modify(struct lu_nodemap *nodemap, enum nodemap_rbac_roles old_rbac, enum nodemap_raise_privs old_privs, diff --git a/lustre/ptlrpc/nrs_orr.c b/lustre/ptlrpc/nrs_orr.c index 5ce91c0..874e7f1 100644 --- a/lustre/ptlrpc/nrs_orr.c +++ b/lustre/ptlrpc/nrs_orr.c @@ -1676,6 +1676,7 @@ static const char *nrs_orr_supp2str(enum nrs_orr_supp supp) return LPROCFS_NRS_SUPP_NAME_READWRITES; default: LBUG(); + return NULL; } } -- 1.8.3.1