summaryrefslogtreecommitdiff
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-07-13 07:11:57 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-07-13 07:11:57 +0200
commitc1d4ce2d9eaeccd7e8aef7ec1109df49eaf4f503 (patch)
treecdb1b2876a231901613867976421092ddbb2d46f /include/linux/fs.h
parentbef5e068b89b0f0cf974c987ebba9869a14b44c6 (diff)
parenta13c140cc289c0b7b3770bce5b3ad42ab35074aa (diff)
Merge 7.2-rc3 into tty-next
We need the tty/serial fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index d10897b3a1e3..50ce731a2b78 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2444,6 +2444,11 @@ static inline struct mnt_idmap *file_mnt_idmap(const struct file *file)
return mnt_idmap(file->f_path.mnt);
}
+static inline bool file_owner_or_capable(const struct file *file)
+{
+ return inode_owner_or_capable(file_mnt_idmap(file), file_inode(file));
+}
+
/**
* is_idmapped_mnt - check whether a mount is mapped
* @mnt: the mount to check