From d6791f76152af909d8ea81546e714266207eeea5 Mon Sep 17 00:00:00 2001 From: Jeff Roberson Date: Mon, 30 Jan 2006 08:22:56 +0000 Subject: [PATCH] - vn_lock with LK_RETRY can not return an error. The code that handled this case was not necessary. Sponsored by: Isilon Systems, Inc. --- sys/compat/linux/linux_getcwd.c | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/sys/compat/linux/linux_getcwd.c b/sys/compat/linux/linux_getcwd.c index 1e2dabae907a..2835d5c51bdb 100644 --- a/sys/compat/linux/linux_getcwd.c +++ b/sys/compat/linux/linux_getcwd.c @@ -327,11 +327,8 @@ linux_getcwd_common (lvp, rvp, bpp, bufp, limit, flags, td) */ error = vn_lock(lvp, LK_EXCLUSIVE | LK_RETRY, td); - if (error) { - vrele(lvp); - lvp = NULL; - goto out; - } + if (error != 0) + panic("vn_lock LK_RETRY returned error %d", error); if (bufp) bp = *bpp; /* @@ -383,11 +380,8 @@ linux_getcwd_common (lvp, rvp, bpp, bufp, limit, flags, td) } VREF(lvp); error = vn_lock(lvp, LK_EXCLUSIVE | LK_RETRY, td); - if (error != 0) { - vrele(lvp); - lvp = NULL; - goto out; - } + if (error != 0) + panic("vn_lock LK_RETRY returned %d", error); } error = linux_getcwd_scandir(&lvp, &uvp, &bp, bufp, td); if (error)