ovl: simplify empty checking
authorMiklos Szeredi <mszeredi@redhat.com>
Fri, 29 Jul 2016 10:05:25 +0000 (12:05 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Fri, 29 Jul 2016 10:05:25 +0000 (12:05 +0200)
commit30c17ebfb2a11468fe825de19afa3934ee98bfd2
tree231bafeafebab56786642d36526782dbe42f49e4
parent29c42e80ba5b1e59a4f427b44e2bdebd347b9409
ovl: simplify empty checking

The empty checking logic is duplicated in ovl_check_empty_and_clear() and
ovl_remove_and_whiteout(), except the condition for clearing whiteouts is
different:

ovl_check_empty_and_clear() checked for being upper

ovl_remove_and_whiteout() checked for merge OR lower

Move the intersection of those checks (upper AND merge) into
ovl_check_empty_and_clear() and simplify ovl_remove_and_whiteout().

Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/dir.c