]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
For b/3162458, don't skip files with d_ino==0 -- our tmpfs systems sometimes create...
authorPaul Pluzhnikov <ppluzhnikov@google.com>
Mon, 3 Mar 2014 19:08:11 +0000 (11:08 -0800)
committerPaul Pluzhnikov <ppluzhnikov@google.com>
Mon, 3 Mar 2014 19:08:11 +0000 (11:08 -0800)
README.google
posix/glob.c
sysdeps/posix/readdir.c
sysdeps/posix/readdir_r.c

index 6322484c300da79ad1004b75223c728a745912c6..50900b9c3c3f77e636a9fb39b258a32a7168b0ea 100644 (file)
@@ -155,3 +155,11 @@ stdio-common/tstdiomisc.c
   Forward-ported from cl/51376114 (from cl/41709-p2).
   (ppluzhnikov, google-local)
 
+posix/glob.c
+sysdeps/unix/readdir.c
+sysdeps/unix/readdir_r.c
+  For b/3162458, don't skip files with d_ino==0 -- our tmpfs systems
+  sometimes create them due to inode wraparound.
+  Forward-ported from cl/51430993 (from cl/45000-p2).
+  (ppluzhnikov, google-local)
+
index f1431088a23ba81efe70ed514d18c86b1ba51a80..6f693f748df9b16cf0b0cc524a58e1fefbfc275d 100644 (file)
 # define REAL_DIR_ENTRY(dp) (dp->d_ino != 0)
 #endif /* POSIX */
 
+/* Google-local: for b/3162458, don't ignore entries with d_ino == 0  */
+#undef REAL_DIR_ENTRY
+#define REAL_DIR_ENTRY(dp) 1
+
 #include <stdlib.h>
 #include <string.h>
 
index 7bb956a916c4fa1a142101e4cab0bb1627fad6e6..aec1b9557d064caa37b603a322058e3bd50c7088 100644 (file)
@@ -107,8 +107,12 @@ __READDIR (DIR *dirp)
       dirp->filepos += reclen;
 #endif
 
+#if 1  /* Google-local: for b/3162458, don't ignore entries with d_ino == 0  */
+    } while (0);
+#else
       /* Skip deleted files.  */
     } while (dp->d_ino == 0);
+#endif
 
 #ifndef NOT_IN_libc
   __libc_lock_unlock (dirp->lock);
index ee88c9b46d7f4f26c97d2e9dc424e9f7e48a7d42..d819ec0048dff408705e4630666c37a942fa0b94 100644 (file)
@@ -128,7 +128,11 @@ __READDIR_R (DIR *dirp, DIRENT_TYPE *entry, DIRENT_TYPE **result)
 
       /* Skip deleted and ignored files.  */
     }
+#if 1  /* Google-local: for b/3162458, don't ignore entries with d_ino == 0  */
+  while (0);
+#else
   while (dp->d_ino == 0);
+#endif
 
   if (dp != NULL)
     {