ovl: simplify ovl_same_sb() helper
authorAmir Goldstein <amir73il@gmail.com>
Sat, 16 Nov 2019 16:14:41 +0000 (18:14 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Fri, 24 Jan 2020 08:46:45 +0000 (09:46 +0100)
commit0f831ec85eda1ae27490baba106aba632c1d8e94
treef97b25b2abf25f78fb98a3763dee228667fd8665
parent94375f9d5103c2eb2f905381993a2fb70c297364
ovl: simplify ovl_same_sb() helper

No code uses the sb returned from this helper, so make it retrun a boolean
and rename it to ovl_same_fs().

The xino mode is irrelevant when all layers are on same fs, so instead of
describing samefs with mode OVL_XINO_OFF, use a new xino_mode state, which
is 0 in the case of samefs, -1 in the case of xino=off and > 0 with xino
enabled.

Create a new helper ovl_same_dev(), to use instead of the common check for
(ovl_same_fs() || xinobits).

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/inode.c
fs/overlayfs/overlayfs.h
fs/overlayfs/ovl_entry.h
fs/overlayfs/readdir.c
fs/overlayfs/super.c
fs/overlayfs/util.c