Skip to content

Commit cb8c20f

Browse files
amschuma-ntaptrondmypd
authored andcommitted
NFS: Move NFS v3 acl functions to nfs3_fs.h
This code is internal to the v3 module, so other parts of the client shouldn't have any knowledge of it. nfs3_getxattr(), nfs3_setxattr(), and nfs3_removexattr() no longer exist anywhere so I remove the declarations while I'm here. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
1 parent f08460d commit cb8c20f

3 files changed

Lines changed: 20 additions & 33 deletions

File tree

‎fs/nfs/nfs3_fs.h‎

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,25 @@
66
#ifndef __LINUX_FS_NFS_NFS3_FS_H
77
#define __LINUX_FS_NFS_NFS3_FS_H
88

9+
/*
10+
* nfs3acl.c
11+
*/
12+
#ifdef CONFIG_NFS_V3_ACL
13+
extern struct posix_acl *nfs3_get_acl(struct inode *inode, int type);
14+
extern int nfs3_set_acl(struct inode *inode, struct posix_acl *acl, int type);
15+
extern int nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl,
16+
struct posix_acl *dfacl);
17+
extern ssize_t nfs3_listxattr(struct dentry *, char *, size_t);
18+
extern const struct xattr_handler *nfs3_xattr_handlers[];
19+
#else
20+
static inline int nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl,
21+
struct posix_acl *dfacl)
22+
{
23+
return 0;
24+
}
25+
#define nfs3_listxattr NULL
26+
#endif /* CONFIG_NFS_V3_ACL */
27+
928
/* nfs3client.c */
1029
struct nfs_server *nfs3_create_server(struct nfs_mount_info *, struct nfs_subversion *);
1130
struct nfs_server *nfs3_clone_server(struct nfs_server *, struct nfs_fh *,

‎fs/nfs/nfs3super.c‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <linux/module.h>
55
#include <linux/nfs_fs.h>
66
#include "internal.h"
7+
#include "nfs3_fs.h"
78
#include "nfs.h"
89

910
static struct nfs_subversion nfs_v3 = {

‎include/linux/nfs_fs.h‎

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -442,22 +442,6 @@ static inline struct rpc_cred *nfs_file_cred(struct file *file)
442442
return NULL;
443443
}
444444

445-
/*
446-
* linux/fs/nfs/xattr.c
447-
*/
448-
#ifdef CONFIG_NFS_V3_ACL
449-
extern ssize_t nfs3_listxattr(struct dentry *, char *, size_t);
450-
extern ssize_t nfs3_getxattr(struct dentry *, const char *, void *, size_t);
451-
extern int nfs3_setxattr(struct dentry *, const char *,
452-
const void *, size_t, int);
453-
extern int nfs3_removexattr (struct dentry *, const char *name);
454-
#else
455-
# define nfs3_listxattr NULL
456-
# define nfs3_getxattr NULL
457-
# define nfs3_setxattr NULL
458-
# define nfs3_removexattr NULL
459-
#endif
460-
461445
/*
462446
* linux/fs/nfs/direct.c
463447
*/
@@ -548,23 +532,6 @@ extern int nfs_readpages(struct file *, struct address_space *,
548532
extern int nfs_readpage_async(struct nfs_open_context *, struct inode *,
549533
struct page *);
550534

551-
/*
552-
* linux/fs/nfs3proc.c
553-
*/
554-
#ifdef CONFIG_NFS_V3_ACL
555-
extern struct posix_acl *nfs3_get_acl(struct inode *inode, int type);
556-
extern int nfs3_set_acl(struct inode *inode, struct posix_acl *acl, int type);
557-
extern int nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl,
558-
struct posix_acl *dfacl);
559-
extern const struct xattr_handler *nfs3_xattr_handlers[];
560-
#else
561-
static inline int nfs3_proc_setacls(struct inode *inode, struct posix_acl *acl,
562-
struct posix_acl *dfacl)
563-
{
564-
return 0;
565-
}
566-
#endif /* CONFIG_NFS_V3_ACL */
567-
568535
/*
569536
* inline functions
570537
*/

0 commit comments

Comments
 (0)