Lines Matching defs:share
18 #include <linux/lockd/share.h>
21 nlm_cmp_owner(struct nlm_share *share, struct xdr_netobj *oh)
23 return share->s_owner.len == oh->len
24 && !memcmp(share->s_owner.data, oh->data, oh->len);
31 struct nlm_share *share;
35 for (share = file->f_shares; share; share = share->s_next) {
36 if (share->s_host == host && nlm_cmp_owner(share, oh))
38 if ((argp->fsm_access & share->s_mode)
39 || (argp->fsm_mode & share->s_access ))
43 share = kmalloc(sizeof(*share) + oh->len,
45 if (share == NULL)
49 ohdata = (u8 *) (share + 1);
52 share->s_file = file;
53 share->s_host = host;
54 share->s_owner.data = ohdata;
55 share->s_owner.len = oh->len;
56 share->s_next = file->f_shares;
57 file->f_shares = share;
60 share->s_access = argp->fsm_access;
61 share->s_mode = argp->fsm_mode;
66 * Delete a share.
72 struct nlm_share *share, **shpp;
75 for (shpp = &file->f_shares; (share = *shpp) != NULL;
76 shpp = &share->s_next) {
77 if (share->s_host == host && nlm_cmp_owner(share, oh)) {
78 *shpp = share->s_next;
79 kfree(share);
85 * corresponding share. */
96 struct nlm_share *share, **shpp;
99 while ((share = *shpp) != NULL) {
100 if (match(share->s_host, host)) {
101 *shpp = share->s_next;
102 kfree(share);
105 shpp = &share->s_next;