ovl: fix race in private xattr checks
authorMiklos Szeredi <mszeredi@suse.cz>
Thu, 20 Nov 2014 15:40:00 +0000 (16:40 +0100)
committerMiklos Szeredi <mszeredi@suse.cz>
Thu, 20 Nov 2014 15:40:00 +0000 (16:40 +0100)
Xattr operations can race with copy up.  This does not matter as long as
we consistently fiter out "trunsted.overlay.opaque" attribute on upper
directories.

Previously we checked parent against OVL_PATH_MERGE.  This is too general,
and prone to race with copy-up.  I.e. we found the parent to be on the
lower layer but ovl_dentry_real() would return the copied-up dentry,
possibly with the "opaque" attribute.

So instead use ovl_path_real() and decide to filter the attributes based on
the actual type of the dentry we'll use.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>

No differences found