[PATCH v1 11/17] Make sort_pacl_range() global

rick.macklem
2025-12-31T02:22:28Z

nfsd4_decode_posix_acl() needs to call sort_pacl_range() to sort
the ACEs in a decoded POSIX draft ACL attribute.

Signed-off-by: Rick Macklem <rmacklem@uoguelph.ca>
---
fs/nfsd/acl.h | 1 +
fs/nfsd/nfs4acl.c | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/fs/nfsd/acl.h b/fs/nfsd/acl.h
index 213774cebeeb..7e061fee2eea 100644
--- a/fs/nfsd/acl.h
+++ b/fs/nfsd/acl.h
@@ -51,5 +51,6 @@ int nfsd4_get_posix_acl(struct svc_rqst *rqstp, struct dentry *dentry,
struct posix_acl **pacl_ret, struct posix_acl **dpacl_ret);
__be32 nfsd4_acl_to_attr(enum nfs_ftype4 type, struct nfs4_acl *acl,
struct nfsd_attrs *attr);
+void sort_pacl_range(struct posix_acl *pacl, int start, int end);

#endif /* LINUX_NFS4_ACL_H */
diff --git a/fs/nfsd/nfs4acl.c b/fs/nfsd/nfs4acl.c
index 0a184b345f8c..84bef41848ca 100644
--- a/fs/nfsd/nfs4acl.c
+++ b/fs/nfsd/nfs4acl.c
@@ -402,7 +402,7 @@ pace_gt(struct posix_acl_entry *pace1, struct posix_acl_entry *pace2)
return false;
}

-static void
+void
sort_pacl_range(struct posix_acl *pacl, int start, int end) {
int sorted = 0, i;

--
2.49.0