diff --git a/[refs] b/[refs] index 2cb693d9a253..68a6f3ce4d55 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: a685e08987d1edf1995b76511d4c98ea0e905377 +refs/heads/master: 50338b889dc504c69e0cb316ac92d1b9e51f3c8a diff --git a/trunk/fs/namei.c b/trunk/fs/namei.c index 9802345df5e7..6301963b161f 100644 --- a/trunk/fs/namei.c +++ b/trunk/fs/namei.c @@ -2713,8 +2713,10 @@ static long do_unlinkat(int dfd, const char __user *pathname) error = PTR_ERR(dentry); if (!IS_ERR(dentry)) { /* Why not before? Because we want correct error value */ + if (nd.last.name[nd.last.len]) + goto slashes; inode = dentry->d_inode; - if (nd.last.name[nd.last.len] || !inode) + if (!inode) goto slashes; ihold(inode); error = mnt_want_write(nd.path.mnt);