From: Miklos Szeredi Date: Thu, 20 Nov 2014 15:40:02 +0000 (+0100) Subject: ovl: ovl_dir_fsync() cleanup X-Git-Tag: v4.14-rc1~6454^2^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7676895f4736421ebafc48de5078e25ea69e88ee;p=platform%2Fkernel%2Flinux-rpi.git ovl: ovl_dir_fsync() cleanup Check against !OVL_PATH_LOWER instead of OVL_PATH_MERGE. For a copied up directory the two are currently equivalent. Signed-off-by: Miklos Szeredi --- diff --git a/fs/overlayfs/readdir.c b/fs/overlayfs/readdir.c index 7299e96..ab1e3dc 100644 --- a/fs/overlayfs/readdir.c +++ b/fs/overlayfs/readdir.c @@ -450,10 +450,10 @@ static int ovl_dir_fsync(struct file *file, loff_t start, loff_t end, /* * Need to check if we started out being a lower dir, but got copied up */ - if (!od->is_upper && ovl_path_type(dentry) == OVL_PATH_MERGE) { + if (!od->is_upper && ovl_path_type(dentry) != OVL_PATH_LOWER) { struct inode *inode = file_inode(file); - realfile =lockless_dereference(od->upperfile); + realfile = lockless_dereference(od->upperfile); if (!realfile) { struct path upperpath;