Skip to content

Commit ccde1e9

Browse files
fllindenTrond Myklebust
authored andcommitted
nfs: make the buf_to_pages_noslab function available to the nfs code
Make the buf_to_pages_noslab function available to the rest of the NFS code. Rename it to nfs4_buf_to_pages_noslab to be consistent. This will be used later in the NFSv4.2 xattr code. Signed-off-by: Frank van der Linden <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
1 parent 0f44da5 commit ccde1e9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

fs/nfs/nfs4_fs.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -328,6 +328,8 @@ extern void nfs4_update_changeattr(struct inode *dir,
328328
struct nfs4_change_info *cinfo,
329329
unsigned long timestamp,
330330
unsigned long cache_validity);
331+
extern int nfs4_buf_to_pages_noslab(const void *buf, size_t buflen,
332+
struct page **pages);
331333

332334
#if defined(CONFIG_NFS_V4_1)
333335
extern int nfs41_sequence_done(struct rpc_task *, struct nfs4_sequence_res *);

fs/nfs/nfs4proc.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5541,7 +5541,7 @@ static inline int nfs4_server_supports_acls(struct nfs_server *server)
55415541
*/
55425542
#define NFS4ACL_MAXPAGES DIV_ROUND_UP(XATTR_SIZE_MAX, PAGE_SIZE)
55435543

5544-
static int buf_to_pages_noslab(const void *buf, size_t buflen,
5544+
int nfs4_buf_to_pages_noslab(const void *buf, size_t buflen,
55455545
struct page **pages)
55465546
{
55475547
struct page *newpage, **spages;
@@ -5783,7 +5783,7 @@ static int __nfs4_proc_set_acl(struct inode *inode, const void *buf, size_t bufl
57835783
return -EOPNOTSUPP;
57845784
if (npages > ARRAY_SIZE(pages))
57855785
return -ERANGE;
5786-
i = buf_to_pages_noslab(buf, buflen, arg.acl_pages);
5786+
i = nfs4_buf_to_pages_noslab(buf, buflen, arg.acl_pages);
57875787
if (i < 0)
57885788
return i;
57895789
nfs4_inode_make_writeable(inode);

0 commit comments

Comments
 (0)