summaryrefslogtreecommitdiff
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorMark Brown <broonie@kernel.org>2026-07-03 14:46:01 +0100
committerMark Brown <broonie@kernel.org>2026-07-03 14:46:01 +0100
commitfec2d935311b2d3eae84837261a2e2d2cdb26079 (patch)
tree22f532c9dbe667a58d5fb5b351af2053718aa53a /include/linux/fs.h
parent67cceaf02b3cd7fa4fda051411cf94f7c87e63fc (diff)
parent039892c35f9d8f5ea00d7c2ed1c25224f28b11d7 (diff)
downloadlinux-next-fec2d935311b2d3eae84837261a2e2d2cdb26079.tar.gz
linux-next-fec2d935311b2d3eae84837261a2e2d2cdb26079.zip
Merge branch 'mm-stable' of https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm
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