ovl: Add helper ovl_already_copied_up()
authorVivek Goyal <vgoyal@redhat.com>
Fri, 11 May 2018 15:49:28 +0000 (11:49 -0400)
committerMiklos Szeredi <mszeredi@redhat.com>
Fri, 20 Jul 2018 07:56:08 +0000 (09:56 +0200)
commit2002df85367ca69961d39020f56d3d727897be01
treedac68a1f359f9da75b69af772c217e323685fa26
parent44d5bf109a73f4162d97ab714770fdf76a8dc685
ovl: Add helper ovl_already_copied_up()

There are couple of places where we need to know if file is already copied
up (in lockless manner).  Right now its open coded and there are only two
conditions to check.  Soon this patch series will introduce another
condition to check and Amir wants to introduce one more.  So introduce a
helper instead to check this so that code is easier to read.

Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/copy_up.c
fs/overlayfs/overlayfs.h
fs/overlayfs/util.c