diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2016-05-20 16:13:45 -0400 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2016-05-20 16:13:45 -0400 |
commit | a118084432d642eeccb961c7c8cc61525a941fcb (patch) | |
tree | 13583657704b821ad875c0d2fbacab07fc50f53d | |
parent | 2dcd0af568b0cf583645c8a317dd12e344b1c72a (diff) |
vfs: add d_real_inode() helper
Needed by the following fix.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Cc: <stable@vger.kernel.org>
-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 7e9422cb5989..ad5d582f9b14 100644 --- a/include/linux/dcache.h +++ b/include/linux/dcache.h | |||
@@ -576,5 +576,17 @@ static inline struct inode *vfs_select_inode(struct dentry *dentry, | |||
576 | return inode; | 576 | return inode; |
577 | } | 577 | } |
578 | 578 | ||
579 | /** | ||
580 | * d_real_inode - Return the real inode | ||
581 | * @dentry: The dentry to query | ||
582 | * | ||
583 | * If dentry is on an union/overlay, then return the underlying, real inode. | ||
584 | * Otherwise return d_inode(). | ||
585 | */ | ||
586 | static inline struct inode *d_real_inode(struct dentry *dentry) | ||
587 | { | ||
588 | return d_backing_inode(d_real(dentry)); | ||
589 | } | ||
590 | |||
579 | 591 | ||
580 | #endif /* __LINUX_DCACHE_H */ | 592 | #endif /* __LINUX_DCACHE_H */ |