tree-wide: port various places over to new stat_inode_same() helper

This commit is contained in:
Lennart Poettering
2022-02-14 17:27:14 +01:00
parent 38db6211b5
commit a9dac7a6dd
10 changed files with 20 additions and 37 deletions
+2 -4
View File
@@ -298,10 +298,8 @@ fallback_fstat:
if (fstatat(fd, "", &b, AT_EMPTY_PATH) < 0)
return -errno;
/* A directory with same device and inode as its parent? Must
* be the root directory */
if (a.st_dev == b.st_dev &&
a.st_ino == b.st_ino)
/* A directory with same device and inode as its parent? Must be the root directory */
if (stat_inode_same(&a, &b))
return 1;
return check_st_dev && (a.st_dev != b.st_dev);