diff options
author | Linus Torvalds | 2016-06-16 17:16:56 -1000 |
---|---|---|
committer | Linus Torvalds | 2016-06-16 17:16:56 -1000 |
commit | 9c514bedbe6948f31d29c53aceb9234c1484ae69 (patch) | |
tree | 09b2dd9e3a145e9baf0f8e5ada69e729e178dead /include/linux | |
parent | 38327424b40bcebe2de92d07312c89360ac9229a (diff) | |
parent | d0e13f5bbe4be7c8f27736fc40503dcec04b7de0 (diff) |
Merge branch 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs
Pull overlayfs fixes from Miklos Szeredi:
"This contains two regression fixes: one for the xattr API update and
one for using the mounter's creds in file creation in overlayfs.
There's also a fix for a bug in handling hard linked AF_UNIX sockets
that's been there from day one. This fix is overlayfs only despite
the fact that it touches code outside the overlay filesystem: d_real()
is an identity function for all except overlay dentries"
* 'overlayfs-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/vfs:
ovl: fix uid/gid when creating over whiteout
ovl: xattr filter fix
af_unix: fix hard linked sockets on overlay
vfs: add d_real_inode() helper
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/dcache.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/dcache.h b/include/linux/dcache.h index 484c8792da82..f28100f6b556 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h @@ -575,5 +575,17 @@ static inline struct inode *vfs_select_inode(struct dentry *dentry, return inode; } +/** + * d_real_inode - Return the real inode + * @dentry: The dentry to query + * + * If dentry is on an union/overlay, then return the underlying, real inode. + * Otherwise return d_inode(). + */ +static inline struct inode *d_real_inode(struct dentry *dentry) +{ + return d_backing_inode(d_real(dentry)); +} + #endif /* __LINUX_DCACHE_H */ |