Lines Matching refs:share
17 #include <linux/lockd/share.h>
20 nlm_cmp_owner(struct nlm_share *share, struct xdr_netobj *oh)
22 return share->s_owner.len == oh->len
23 && !memcmp(share->s_owner.data, oh->data, oh->len);
30 struct nlm_share *share;
34 for (share = file->f_shares; share; share = share->s_next) {
35 if (share->s_host == host && nlm_cmp_owner(share, oh))
37 if ((argp->fsm_access & share->s_mode)
38 || (argp->fsm_mode & share->s_access ))
42 share = kmalloc(sizeof(*share) + oh->len,
44 if (share == NULL)
48 ohdata = (u8 *) (share + 1);
51 share->s_file = file;
52 share->s_host = host;
53 share->s_owner.data = ohdata;
54 share->s_owner.len = oh->len;
55 share->s_next = file->f_shares;
56 file->f_shares = share;
59 share->s_access = argp->fsm_access;
60 share->s_mode = argp->fsm_mode;
65 * Delete a share.
71 struct nlm_share *share, **shpp;
74 for (shpp = &file->f_shares; (share = *shpp) != 0; shpp = &share->s_next) {
75 if (share->s_host == host && nlm_cmp_owner(share, oh)) {
76 *shpp = share->s_next;
77 kfree(share);
83 * corresponding share. */
94 struct nlm_share *share, **shpp;
97 while ((share = *shpp) != NULL) {
98 if (match(share->s_host, host)) {
99 *shpp = share->s_next;
100 kfree(share);
103 shpp = &share->s_next;