diff options
author | David Howells <dhowells@redhat.com> | 2019-05-14 14:29:11 +0300 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2019-05-17 00:23:21 +0300 |
commit | a38a75581e6e2f783e7b8658e9ca5d4243279f55 (patch) | |
tree | 4df2ddb097f5301ee92e8fe9ba2541b0dd40d9e4 /fs/afs/yfsclient.c | |
parent | 61c347ba551162edb1c6abfa60ce6907baf7a1af (diff) | |
download | linux-a38a75581e6e2f783e7b8658e9ca5d4243279f55.tar.xz |
afs: Fix unlink to handle YFS.RemoveFile2 better
Make use of the status update for the target file that the YFS.RemoveFile2
RPC op returns to correctly update the vnode as to whether the file was
actually deleted or just had nlink reduced.
Fixes: 30062bd13e36 ("afs: Implement YFS support in the fs client")
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/yfsclient.c')
-rw-r--r-- | fs/afs/yfsclient.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/afs/yfsclient.c b/fs/afs/yfsclient.c index c8f71fc9920b..10de675dc6fc 100644 --- a/fs/afs/yfsclient.c +++ b/fs/afs/yfsclient.c @@ -195,6 +195,7 @@ static int xdr_decode_YFSFetchStatus(const __be32 **_bp, if (status->abort_code != 0) { if (status->abort_code == VNOVNODE) status->nlink = 0; + scb->have_error = true; return 0; } @@ -222,6 +223,7 @@ static int xdr_decode_YFSFetchStatus(const __be32 **_bp, status->mtime_server = xdr_to_time(xdr->mtime_server); status->size = xdr_to_u64(xdr->size); status->data_version = xdr_to_u64(xdr->data_version); + scb->have_status = true; *_bp += xdr_size(xdr); return 0; |