X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Fstat.c;h=8806b8997d2efcfd73944df9f3695d40207fb6bf;hb=092f4c56c1927e4b61a41ee8055005f1cb437009;hp=78a3aa83c7eac3f153cc5e370cabd754babb9aab;hpb=d630ba565f3d806d64df4415d4a8457b4ab23db6;p=pandora-kernel.git diff --git a/fs/stat.c b/fs/stat.c index 78a3aa83c7ea..8806b8997d2e 100644 --- a/fs/stat.c +++ b/fs/stat.c @@ -294,15 +294,16 @@ SYSCALL_DEFINE4(readlinkat, int, dfd, const char __user *, pathname, { struct path path; int error; + int empty = 0; if (bufsiz <= 0) return -EINVAL; - error = user_path_at(dfd, pathname, LOOKUP_EMPTY, &path); + error = user_path_at_empty(dfd, pathname, LOOKUP_EMPTY, &path, &empty); if (!error) { struct inode *inode = path.dentry->d_inode; - error = -EINVAL; + error = empty ? -ENOENT : -EINVAL; if (inode->i_op->readlink) { error = security_inode_readlink(path.dentry); if (!error) {