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

Commit 9391dd00 authored by Al Viro's avatar Al Viro
Browse files

fix a braino in ovl_d_select_inode()



when opening a directory we want the overlayfs inode, not one from
the topmost layer.

Reported-By: default avatarAndrey Jr. Melnikov <temnota.am@gmail.com>
Tested-By: default avatarAndrey Jr. Melnikov <temnota.am@gmail.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 0a73d0a2
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -343,6 +343,9 @@ struct inode *ovl_d_select_inode(struct dentry *dentry, unsigned file_flags)
	struct path realpath;
	enum ovl_path_type type;

	if (d_is_dir(dentry))
		return d_backing_inode(dentry);

	type = ovl_path_real(dentry, &realpath);
	if (ovl_open_need_copy_up(file_flags, type, realpath.dentry)) {
		err = ovl_want_write(dentry);