xref: /linux/fs/lockd/share.h (revision 0fc8f6200d2313278fbf4539bbab74677c685531)
14db2f8a0SChuck Lever /* SPDX-License-Identifier: GPL-2.0 */
24db2f8a0SChuck Lever /*
34db2f8a0SChuck Lever  * DOS share management for lockd.
44db2f8a0SChuck Lever  *
54db2f8a0SChuck Lever  * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de>
64db2f8a0SChuck Lever  */
74db2f8a0SChuck Lever 
84db2f8a0SChuck Lever #ifndef _LOCKD_SHARE_H
94db2f8a0SChuck Lever #define _LOCKD_SHARE_H
104db2f8a0SChuck Lever 
11*515788faSChuck Lever /* Synthetic svid for lockowner lookup during share operations */
12*515788faSChuck Lever #define LOCKD_SHARE_SVID	(~(u32)0)
13*515788faSChuck Lever 
144db2f8a0SChuck Lever /*
154db2f8a0SChuck Lever  * DOS share for a specific file
164db2f8a0SChuck Lever  */
174db2f8a0SChuck Lever struct nlm_share {
184db2f8a0SChuck Lever 	struct nlm_share *	s_next;		/* linked list */
194db2f8a0SChuck Lever 	struct nlm_host *	s_host;		/* client host */
204db2f8a0SChuck Lever 	struct nlm_file *	s_file;		/* shared file */
214db2f8a0SChuck Lever 	struct xdr_netobj	s_owner;	/* owner handle */
224db2f8a0SChuck Lever 	u32			s_access;	/* access mode */
234db2f8a0SChuck Lever 	u32			s_mode;		/* deny mode */
244db2f8a0SChuck Lever };
254db2f8a0SChuck Lever 
264e6814b1SChuck Lever __be32	nlmsvc_share_file(struct nlm_host *host, struct nlm_file *file,
274e6814b1SChuck Lever 			  struct xdr_netobj *oh, u32 access, u32 mode);
284e6814b1SChuck Lever __be32	nlmsvc_unshare_file(struct nlm_host *host, struct nlm_file *file,
294e6814b1SChuck Lever 			    struct xdr_netobj *oh);
304db2f8a0SChuck Lever void	nlmsvc_traverse_shares(struct nlm_host *, struct nlm_file *,
314db2f8a0SChuck Lever 					       nlm_host_match_fn_t);
324db2f8a0SChuck Lever 
334db2f8a0SChuck Lever #endif /* _LOCKD_SHARE_H */
34