Whamcloud - gitweb
LU-18906 build: page_cache_alloc removed, missing return 24/58724/4
authorShaun Tancheff <shaun.tancheff@hpe.com>
Fri, 11 Apr 2025 01:39:43 +0000 (08:39 +0700)
committerOleg Drokin <green@whamcloud.com>
Fri, 25 Apr 2025 00:53:13 +0000 (00:53 +0000)
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 <shaun.tancheff@hpe.com>
Change-Id: I6d5131748efc7d7fcc51c4dc3b06070057cb0f0e
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58724
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Robert Read <rread@ddn.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/file.c
lustre/ptlrpc/nodemap_handler.c
lustre/ptlrpc/nrs_orr.c

index 57cab07..b3163cb 100644 (file)
@@ -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;
 
index dbd7376..e8a70e5 100644 (file)
@@ -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,
index 5ce91c0..874e7f1 100644 (file)
@@ -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;
        }
 }