ovl: rearrange code in ovl_copy_up_locked()
authorAmir Goldstein <amir73il@gmail.com>
Tue, 17 Jan 2017 04:34:54 +0000 (06:34 +0200)
committerMiklos Szeredi <mszeredi@redhat.com>
Tue, 7 Feb 2017 14:47:14 +0000 (15:47 +0100)
commit42f269b925405d9dd45014823e5057786d6ca452
tree82aabcc03028c775b0863db6bd1ec93c4e26ce76
parente7f52429b4a5b2e3224948d1737eb264c8f7e15f
ovl: rearrange code in ovl_copy_up_locked()

As preparation to implementing copy up with O_TMPFILE,
name the variable for dentry before final rename 'temp' and
assign it to 'newdentry' only after rename.

Also lookup upper dentry before looking up temp dentry and
move ovl_set_timestamps() into ovl_copy_up_locked(), because
that is going to be more convenient for upcoming change.

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/copy_up.c