]> git.baikalelectronics.ru Git - kernel.git/commit
ovl: set d->is_dir and d->opaque for last path element
authorVivek Goyal <vgoyal@redhat.com>
Fri, 9 Mar 2018 20:44:43 +0000 (15:44 -0500)
committerMiklos Szeredi <mszeredi@redhat.com>
Thu, 12 Apr 2018 10:04:49 +0000 (12:04 +0200)
commit499db23d6bc8a9534d7b88d92de3e9e672bada38
treecd05df92289ee28d57a8ce50d71ed4be6d830b30
parent0b6dc8a1b5c73cddf76afcf37ed29c8c054d19dc
ovl: set d->is_dir and d->opaque for last path element

Certain properties in ovl_lookup_data should be set only for the last
element of the path. IOW, if we are calling ovl_lookup_single() for an
absolute redirect, then d->is_dir and d->opaque do not make much sense
for intermediate path elements. Instead set them only if dentry being
lookup is last path element.

As of now we do not seem to be making use of d->opaque if it is set for
a path/dentry in lower. But just define the semantics so that future code
can make use of this assumption.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/namei.c