diff options
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 58ce336d4a6b..98205f680476 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -284,6 +284,7 @@ extern int dir_notify_enable; #include <linux/pid.h> #include <linux/mutex.h> #include <linux/sysctl.h> +#include <linux/capability.h> #include <asm/atomic.h> #include <asm/semaphore.h> @@ -990,6 +991,9 @@ enum { #define put_fs_excl() atomic_dec(¤t->fs_excl) #define has_fs_excl() atomic_read(¤t->fs_excl) +#define is_owner_or_cap(inode) \ + ((current->fsuid == (inode)->i_uid) || capable(CAP_FOWNER)) + /* not quite ready to be deprecated, but... */ extern void lock_super(struct super_block *); extern void unlock_super(struct super_block *); |