projects
/
firefly-linux-kernel-4.4.55.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'for-4.4' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq
[firefly-linux-kernel-4.4.55.git]
/
fs
/
lockd
/
svcshare.c
diff --git
a/fs/lockd/svcshare.c
b/fs/lockd/svcshare.c
index 6220dc2a3f2c246e31817902a674648321fd6873..b0ae07008700c65de59ddb2404a51dd642c84aee 100644
(file)
--- a/
fs/lockd/svcshare.c
+++ b/
fs/lockd/svcshare.c
@@
-39,7
+39,7
@@
nlmsvc_share_file(struct nlm_host *host, struct nlm_file *file,
return nlm_lck_denied;
}
return nlm_lck_denied;
}
- share =
(struct nlm_share *)
kmalloc(sizeof(*share) + oh->len,
+ share = kmalloc(sizeof(*share) + oh->len,
GFP_KERNEL);
if (share == NULL)
return nlm_lck_denied_nolocks;
GFP_KERNEL);
if (share == NULL)
return nlm_lck_denied_nolocks;
@@
-71,7
+71,8
@@
nlmsvc_unshare_file(struct nlm_host *host, struct nlm_file *file,
struct nlm_share *share, **shpp;
struct xdr_netobj *oh = &argp->lock.oh;
struct nlm_share *share, **shpp;
struct xdr_netobj *oh = &argp->lock.oh;
- for (shpp = &file->f_shares; (share = *shpp) != 0; shpp = &share->s_next) {
+ for (shpp = &file->f_shares; (share = *shpp) != NULL;
+ shpp = &share->s_next) {
if (share->s_host == host && nlm_cmp_owner(share, oh)) {
*shpp = share->s_next;
kfree(share);
if (share->s_host == host && nlm_cmp_owner(share, oh)) {
*shpp = share->s_next;
kfree(share);