NFSv4: Fix open(O_TRUNC) and ftruncate() error handling
If the file wasn't opened for writing, then truncate and ftruncate need to report the appropriate errors. Reported-by: NMiklos Szeredi <miklos@szeredi.hu> Signed-off-by: NTrond Myklebust <Trond.Myklebust@netapp.com> Cc: stable@vger.kernel.org
Showing
想要评论请 注册 或 登录