]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ovl: simplify empty checking
authorMiklos Szeredi <mszeredi@redhat.com>
Fri, 29 Jul 2016 10:05:25 +0000 (12:05 +0200)
committerShan Hai <shan.hai@oracle.com>
Fri, 4 Aug 2017 05:52:33 +0000 (13:52 +0800)
commit4909a70e7cbca9f15cee2976edea971cc132822b
tree4a95c31ccef561929d98f0d13513ff12c4c4625d
parent7c245a9014b6a08dc1577a431cce4579a7b38026
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>
Orabug: 26401569

(backport upstream commit 30c17ebfb2a11468fe825de19afa3934ee98bfd2)

Signed-off-by: Shan Hai <shan.hai@oracle.com>
Reviewed-by: Somasundaram Krishnasamy <somasundaram.krishnasamy@oracle.com>
fs/overlayfs/dir.c