Skip to content

Commit

Permalink
ovl: ovl_dir_fsync() cleanup
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Miklos Szeredi committed Nov 20, 2014
1 parent 1d11373 commit 7676895
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions fs/overlayfs/readdir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 7676895

Please sign in to comment.