summaryrefslogtreecommitdiffstats
path: root/fs/lockd
diff options
context:
space:
mode:
authorJeff Layton <jlayton@redhat.com>2008-07-15 18:35:20 +0200
committerJ. Bruce Fields <bfields@citi.umich.edu>2008-07-15 18:35:20 +0200
commitb0e92aae157cbf78ede7b7dd03967b49fcb2102e (patch)
tree8540a64fdf71092789d994f258cb2d07054a42f1 /fs/lockd
parentfile lock: reorder struct file_lock to save space on 64 bit builds (diff)
downloadlinux-b0e92aae157cbf78ede7b7dd03967b49fcb2102e.tar.xz
linux-b0e92aae157cbf78ede7b7dd03967b49fcb2102e.zip
lockd: nlm_release_host() checks for NULL, caller needn't
No need to check for a NULL argument twice. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/lockd')
-rw-r--r--fs/lockd/svc4proc.c3
-rw-r--r--fs/lockd/svcproc.c3
2 files changed, 2 insertions, 4 deletions
diff --git a/fs/lockd/svc4proc.c b/fs/lockd/svc4proc.c
index 385437e3387d..006a832d46f2 100644
--- a/fs/lockd/svc4proc.c
+++ b/fs/lockd/svc4proc.c
@@ -58,8 +58,7 @@ nlm4svc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp,
return 0;
no_locks:
- if (host)
- nlm_release_host(host);
+ nlm_release_host(host);
if (error)
return error;
return nlm_lck_denied_nolocks;
diff --git a/fs/lockd/svcproc.c b/fs/lockd/svcproc.c
index 88379cc6e0b1..fce3d7039625 100644
--- a/fs/lockd/svcproc.c
+++ b/fs/lockd/svcproc.c
@@ -87,8 +87,7 @@ nlmsvc_retrieve_args(struct svc_rqst *rqstp, struct nlm_args *argp,
return 0;
no_locks:
- if (host)
- nlm_release_host(host);
+ nlm_release_host(host);
if (error)
return error;
return nlm_lck_denied_nolocks;