aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Szeredi <mszeredi@suse.cz>2014-11-20 16:40:02 +0100
committerAlex Shi <alex.shi@linaro.org>2015-04-17 15:51:08 +0800
commiteffb810d716f07d643385ba8206ab981a4b20dd9 (patch)
tree93a624a7e45203f912b60f930ab3f429db5abda2
parentd3a45e42dd711ce4e2095f14d77865b78c749190 (diff)
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 <mszeredi@suse.cz> (cherry picked from commit 7676895f4736421ebafc48de5078e25ea69e88ee) Signed-off-by: Alex Shi <alex.shi@linaro.org>
-rw-r--r--fs/overlayfs/readdir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/overlayfs/readdir.c b/fs/overlayfs/readdir.c
index 6d5d9fd06ec0..c0205990a9f5 100644
--- a/fs/overlayfs/readdir.c
+++ b/fs/overlayfs/readdir.c
@@ -452,10 +452,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;