On Thu, May 10, 2018 at 5:32 PM, Vivek Goyal <vgoyal@xxxxxxxxxx> wrote: > On Thu, May 10, 2018 at 11:36:16AM +0200, Miklos Szeredi wrote: > [..] >> > We also need to check file type here, only regular file makes sense as >> > metacopy, so if it's something else, then get out with EIO. >> >> I meant file type of *data* inode. Type of metacopy inode is already >> checked by ovl_check_metacopy_xattr(). > > Hi Miklos, > > IIUC, ovl_lookup_single() will make sure we don't return directory dentry > for a metacopy upper (After your suggested changes). > > if (last_element) { > if (d->metacopy) { > d->stop = true; > goto put_and_out; > } > d->is_dir = true; > } > > If that's the case, then we probably don't need additional check in > ovl_lookup(). It should check d_is_reg() explicitly. Being non-dir doesn't mean it's a regular file. Thanks, Miklos -- To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html