]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ovl: fix open in stacked overlay
authorMiklos Szeredi <miklos@szeredi.hu>
Mon, 12 Oct 2015 13:56:20 +0000 (15:56 +0200)
committerShan Hai <shan.hai@oracle.com>
Fri, 4 Aug 2017 05:44:07 +0000 (13:44 +0800)
commitbe7d810e0217b7af18dd3513fcbfb209ac4bee60
tree1f7b23a2fc8cff8d5fa9ffc742085d546460ed52
parentae33f2fd5a5bc6613298a3319b551ccd22550104
ovl: fix open in stacked overlay

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>
Cc: <stable@vger.kernel.org> # v4.2+
Orabug: 26401569

(backport upstream commit 1c8a47df36d72ace8cf78eb6c228aa0f8027d3c2)

Signed-off-by: Shan Hai <shan.hai@oracle.com>
Reviewed-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
fs/overlayfs/inode.c