]> git.decadent.org.uk Git - nfs-utils.git/commitdiff
rpc.idmapd: Ignore open failures in dirscancb()
authorDavid Jeffery <djeffery@redhat.com>
Wed, 16 Jan 2013 20:21:55 +0000 (15:21 -0500)
committerSteve Dickson <steved@redhat.com>
Wed, 16 Jan 2013 20:33:17 +0000 (15:33 -0500)
From: David Jeffery <djeffery@redhat.com>

The daemon "rpc.idmapd" scans the /var/lib/nfs/rpc_pipefs/nfs/ directory
periodically looking for NFS client mounts to communicate to. The daemon
tried to open communication with a client mount but it disappeared in
between looking for directory entries and opening them. NFS mount was
umounted just before rpc.idmapd tried to communicate with it. This
behavior is usually seen when autofs is configured on the system.

Signed-off-by: Steve Dickson <steved@redhat.com>
utils/idmapd/idmapd.c

index 9d66225e01d7642aa40223bbacccc0a4a31c8292..beba9c4517076e156ad697f6b66d362b8d444aae 100644 (file)
@@ -424,7 +424,8 @@ dirscancb(int UNUSED(fd), short UNUSED(which), void *data)
                            pipefsdir, ents[i]->d_name);
 
                        if ((ic->ic_dirfd = open(path, O_RDONLY, 0)) == -1) {
                            pipefsdir, ents[i]->d_name);
 
                        if ((ic->ic_dirfd = open(path, O_RDONLY, 0)) == -1) {
-                               xlog_warn("dirscancb: open(%s): %s", path, strerror(errno));
+                               if (verbose > 0)
+                                       xlog_warn("dirscancb: open(%s): %s", path, strerror(errno));
                                free(ic);
                                goto out;
                        }
                                free(ic);
                                goto out;
                        }