statx: add mount_root
authorMiklos Szeredi <mszeredi@redhat.com>
Thu, 14 May 2020 14:44:24 +0000 (16:44 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Thu, 14 May 2020 14:44:24 +0000 (16:44 +0200)
commit80340fe3605c0e78cfe496c3b3878be828cfdbfe
treea579a0172a6e31a9fe0b11c186f130a4fe9479a6
parentfa2fcf4f1df1559a0a4ee0f46915b496cc2ebf60
statx: add mount_root

Determining whether a path or file descriptor refers to a mountpoint (or
more precisely a mount root) is not trivial using current tools.

Add a flag to statx that indicates whether the path or fd refers to the
root of a mount or not.

Cc: linux-api@vger.kernel.org
Cc: linux-man@vger.kernel.org
Reported-by: Lennart Poettering <mzxreary@0pointer.de>
Reported-by: J. Bruce Fields <bfields@fieldses.org>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
fs/stat.c
include/uapi/linux/stat.h