xref: /linux/fs/lockd/share.h (revision 0fc8f6200d2313278fbf4539bbab74677c685531)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * DOS share management for lockd.
4  *
5  * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de>
6  */
7 
8 #ifndef _LOCKD_SHARE_H
9 #define _LOCKD_SHARE_H
10 
11 /* Synthetic svid for lockowner lookup during share operations */
12 #define LOCKD_SHARE_SVID	(~(u32)0)
13 
14 /*
15  * DOS share for a specific file
16  */
17 struct nlm_share {
18 	struct nlm_share *	s_next;		/* linked list */
19 	struct nlm_host *	s_host;		/* client host */
20 	struct nlm_file *	s_file;		/* shared file */
21 	struct xdr_netobj	s_owner;	/* owner handle */
22 	u32			s_access;	/* access mode */
23 	u32			s_mode;		/* deny mode */
24 };
25 
26 __be32	nlmsvc_share_file(struct nlm_host *host, struct nlm_file *file,
27 			  struct xdr_netobj *oh, u32 access, u32 mode);
28 __be32	nlmsvc_unshare_file(struct nlm_host *host, struct nlm_file *file,
29 			    struct xdr_netobj *oh);
30 void	nlmsvc_traverse_shares(struct nlm_host *, struct nlm_file *,
31 					       nlm_host_match_fn_t);
32 
33 #endif /* _LOCKD_SHARE_H */
34