]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ovl: fix open in stacked overlay
authorMiklos Szeredi <miklos@szeredi.hu>
Mon, 12 Oct 2015 13:56:20 +0000 (15:56 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 9 Nov 2015 22:37:37 +0000 (14:37 -0800)
commit3f9789e4d67c1f5035f7b642288c32025f4e06ed
tree1dc93db27f219adb64e4adc3e80a5936258153a1
parent64aceaeb1c141c8a03f9945614686f6491d328aa
ovl: fix open in stacked overlay

commit 1c8a47df36d72ace8cf78eb6c228aa0f8027d3c2 upstream.

If two overlayfs filesystems are stacked on top of each other, then we need
recursion in ovl_d_select_inode().

I guess d_backing_inode() is supposed to do that.  But currently it doesn't
and that functionality is open coded in vfs_open().  This is now copied
into ovl_d_select_inode() to fix this regression.

Reported-by: Alban Crequy <alban.crequy@gmail.com>
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Fixes: 4bacc9c9234c ("overlayfs: Make f_path always point to the overlay...")
Cc: David Howells <dhowells@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/overlayfs/inode.c