]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
ovl: ovl_dir_fsync() cleanup
authorMiklos Szeredi <mszeredi@suse.cz>
Thu, 20 Nov 2014 15:40:02 +0000 (16:40 +0100)
committerMiklos Szeredi <mszeredi@suse.cz>
Thu, 20 Nov 2014 15:40:02 +0000 (16:40 +0100)
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>
fs/overlayfs/readdir.c

index 7299e962f33440d05cb4cb96175a6f2dc2e55c5c..ab1e3dcbed9523d05b3bf4d73a5b685532e0acaa 100644 (file)
@@ -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;