diff options
author | Lennart Poettering <lennart@poettering.net> | 2022-02-14 17:21:41 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2022-02-14 17:27:14 +0100 |
commit | a9dac7a6dd31225dbe9633061dcade12c0c90a32 (patch) | |
tree | 9fdf4d4480ecc18aa7306f8eddce2d9f5a8649d3 /src/basic/mountpoint-util.c | |
parent | 38db6211b5aa6e2fb65883ae3353914e82f5bef1 (diff) | |
download | systemd-a9dac7a6dd31225dbe9633061dcade12c0c90a32.tar.gz |
tree-wide: port various places over to new stat_inode_same() helper
Diffstat (limited to 'src/basic/mountpoint-util.c')
-rw-r--r-- | src/basic/mountpoint-util.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/basic/mountpoint-util.c b/src/basic/mountpoint-util.c index 82a33a6829..2e451085be 100644 --- a/src/basic/mountpoint-util.c +++ b/src/basic/mountpoint-util.c @@ -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); |