mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-23 23:32:14 +00:00
vfs: replace calling i_op->readlink with vfs_readlink()
Also check d_is_symlink() in callers instead of inode->i_op->readlink because following patches will allow NULL ->readlink for symlinks. Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
parent
2a07a1f5ab
commit
fd4a0edf2a
6 changed files with 35 additions and 13 deletions
|
@ -3576,10 +3576,10 @@ nfsd4_encode_readlink(struct nfsd4_compoundres *resp, __be32 nfserr, struct nfsd
|
|||
if (!p)
|
||||
return nfserr_resource;
|
||||
/*
|
||||
* XXX: By default, the ->readlink() VFS op will truncate symlinks
|
||||
* if they would overflow the buffer. Is this kosher in NFSv4? If
|
||||
* not, one easy fix is: if ->readlink() precisely fills the buffer,
|
||||
* assume that truncation occurred, and return NFS4ERR_RESOURCE.
|
||||
* XXX: By default, vfs_readlink() will truncate symlinks if they
|
||||
* would overflow the buffer. Is this kosher in NFSv4? If not, one
|
||||
* easy fix is: if vfs_readlink() precisely fills the buffer, assume
|
||||
* that truncation occurred, and return NFS4ERR_RESOURCE.
|
||||
*/
|
||||
nfserr = nfsd_readlink(readlink->rl_rqstp, readlink->rl_fhp,
|
||||
(char *)p, &maxcount);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue