Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b1742eb authored by Miklos Szeredi's avatar Miklos Szeredi
Browse files

vfs: make argument of d_real_inode() const



d_op->d_real() leaves the dentry alone except if the third argument is
non-zero.  Unfortunately very difficult to explain to the compiler without
a cast.

Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
Acked-by: default avatarJeff Layton <jlayton@poochiereds.net>
parent c568d683
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -584,9 +584,10 @@ static inline struct dentry *d_real(struct dentry *dentry,
 * 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)
static inline struct inode *d_real_inode(const struct dentry *dentry)
{
	return d_backing_inode(d_real(dentry, NULL, 0));
	/* This usage of d_real() results in const dentry */
	return d_backing_inode(d_real((struct dentry *) dentry, NULL, 0));
}