X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=fs%2Finode.c;h=03216c28ea7af87d2859b440e124edbd66b2aae6;hb=HEAD;hp=50370599e37104708b95ede3a627052cc0d910d3;hpb=055655a9f0fefef2256310a128a4cdaff8b8c432;p=mirror_ubuntu-artful-kernel.git diff --git a/fs/inode.c b/fs/inode.c index 50370599e371..03216c28ea7a 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -637,6 +637,7 @@ again: dispose_list(&dispose); } +EXPORT_SYMBOL_GPL(evict_inodes); /** * invalidate_inodes - attempt to free all inodes on a superblock @@ -1641,7 +1642,7 @@ EXPORT_SYMBOL(generic_update_time); * This does the actual work of updating an inodes time or version. Must have * had called mnt_want_write() before calling this. */ -static int update_time(struct inode *inode, struct timespec *time, int flags) +int update_time(struct inode *inode, struct timespec *time, int flags) { int (*update_time)(struct inode *, struct timespec *, int); @@ -1650,6 +1651,7 @@ static int update_time(struct inode *inode, struct timespec *time, int flags) return update_time(inode, time, flags); } +EXPORT_SYMBOL_GPL(update_time); /** * touch_atime - update the access time @@ -1735,7 +1737,8 @@ EXPORT_SYMBOL(touch_atime); */ int should_remove_suid(struct dentry *dentry) { - umode_t mode = d_inode(dentry)->i_mode; + struct inode *inode = d_inode(dentry); + umode_t mode = inode->i_mode; int kill = 0; /* suid always must be killed */ @@ -1749,7 +1752,8 @@ int should_remove_suid(struct dentry *dentry) if (unlikely((mode & S_ISGID) && (mode & S_IXGRP))) kill |= ATTR_KILL_SGID; - if (unlikely(kill && !capable(CAP_FSETID) && S_ISREG(mode))) + if (unlikely(kill && !capable_wrt_inode_uidgid(inode, CAP_FSETID) && + S_ISREG(mode))) return kill; return 0;