]> git.baikalelectronics.ru Git - kernel.git/commit
NFSv4: Fix open(O_TRUNC) and ftruncate() error handling
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 18 Apr 2012 20:29:11 +0000 (16:29 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Thu, 19 Apr 2012 17:23:09 +0000 (13:23 -0400)
commit315d710635fc8206db22211662fc9140a01e2037
tree207795769b9e1b18952f67fda9db5c7259fb9d63
parente0e97b944e74a6288b6c84925c20e60323ebd4c5
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: Miklos Szeredi <miklos@szeredi.hu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Cc: stable@vger.kernel.org
fs/nfs/dir.c
fs/nfs/nfs4proc.c