From: Jeff Moyer Subject: [patch] daemon/direct.c: check the return code from stat(2) Date: Fri, 04 Sep 2009 14:29:06 -0400 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: autofs-bounces@linux.kernel.org Errors-To: autofs-bounces@linux.kernel.org To: raven@themaw.net Cc: autofs@linux.kernel.org Another trivial patch. Cheers, Jeff Signed-off-by: Jeff Moyer diff --git a/daemon/direct.c b/daemon/direct.c index 0c78627..9b4e57b 100644 --- a/daemon/direct.c +++ b/daemon/direct.c @@ -1245,7 +1245,7 @@ static void *do_mount_direct(void *arg) } status = stat(mt.name, &st); - if (!S_ISDIR(st.st_mode) || st.st_dev != mt.dev) { + if (status != 0 || !S_ISDIR(st.st_mode) || st.st_dev != mt.dev) { error(ap->logopt, "direct trigger not valid or already mounted %s", mt.name);