]> asedeno.scripts.mit.edu Git - linux.git/commit
ovl: make ovl_create_real() cope with vfs_mkdir() safely
authorAl Viro <viro@zeniv.linux.org.uk>
Wed, 16 May 2018 15:19:53 +0000 (18:19 +0300)
committerMiklos Szeredi <mszeredi@redhat.com>
Thu, 31 May 2018 09:06:11 +0000 (11:06 +0200)
commitf73cc77c3afffc9a90fad972fe34af52cdb72979
tree025f4c46514313a2ec0c09f35d652ebdbad7f6b7
parent137ec526a20c4e4d21d658a6581b471d39860911
ovl: make ovl_create_real() cope with vfs_mkdir() safely

vfs_mkdir() may succeed and leave the dentry passed to it unhashed and
negative.  ovl_create_real() is the last caller breaking when that
happens.

[amir: split re-factoring of ovl_create_temp() to prep patch
       add comment about unhashed dir after mkdir
       add pr_warn() if mkdir succeeds and lookup fails]

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/overlayfs/dir.c