kern_path() returns error in kernel 4.4

From: dongke di
Date: Mon Jun 13 2016 - 05:12:33 EST


struct path path;
int r = kern_path( "/tmp/abc.txt", LOOKUP_FOLLOW | LOOKUP_PARENT, &path );

The file abc.txt does not exist.

On Ubuntu 14.04 ( kernel 3.13 ), r is zero (succed).
On Ubuntu 16.04 ( kernel 4.4 ), r is -2 ( fail).

Is it a bug or other else ?