From: Sascha Wildner Date: Fri, 21 Feb 2014 16:44:36 +0000 (+0100) Subject: rpc.lockd(8): Fix some references of the wrong lock. X-Git-Tag: v3.9.0~502 X-Git-Url: https://gitweb.dragonflybsd.org/~tuxillo/dragonfly.git/commitdiff_plain/29357d577416c492fed694332fb5cc1e044b7ab4 rpc.lockd(8): Fix some references of the wrong lock. fl is used later on to iterate through the lock list but here, rfl is meant. While here, fix a spell-o in a comment. --- diff --git a/usr.sbin/rpc.lockd/lockd_lock.c b/usr.sbin/rpc.lockd/lockd_lock.c index 6e42507747..87ae5a6113 100644 --- a/usr.sbin/rpc.lockd/lockd_lock.c +++ b/usr.sbin/rpc.lockd/lockd_lock.c @@ -585,19 +585,19 @@ do_unlock(struct file_lock *rfl) int error; int lockst; - /* unlock the file: closing is enouth ! */ + /* unlock the file: closing is enough! */ if (close(rfl->fd) < 0) { if (errno == ESTALE) error = nlm4_stale_fh; else error = nlm4_failed; - if ((fl->flags & LOCK_V4) == 0) + if ((rfl->flags & LOCK_V4) == 0) error = nlm_denied; syslog(LOG_NOTICE, "close failed (from %s): %s", rfl->client_name, strerror(errno)); } else { - error = (fl->flags & LOCK_V4) ? + error = (rfl->flags & LOCK_V4) ? nlm4_granted : nlm_granted; } LIST_REMOVE(rfl, lcklst);