NFSv4: Add a mapping for NFS4ERR_FILE_OPEN in nfs4_map_errors
authorTrond Myklebust <Trond.Myklebust@netapp.com>
Sat, 23 Mar 2013 19:22:45 +0000 (15:22 -0400)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Wed, 27 Mar 2013 16:44:40 +0000 (12:44 -0400)
With unlink is an asynchronous operation in the sillyrename case, it
expects nfs4_async_handle_error() to map the error correctly.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
fs/nfs/nfs4proc.c

index 06e5a72b5fa233dd6acbf614de8d5d721d2c427c..3e7d42fb775cbbc5597d2f499d2af80cd4c7cff0 100644 (file)
@@ -107,6 +107,8 @@ static int nfs4_map_errors(int err)
                return -EPROTONOSUPPORT;
        case -NFS4ERR_ACCESS:
                return -EACCES;
+       case -NFS4ERR_FILE_OPEN:
+               return -EBUSY;
        default:
                dprintk("%s could not handle NFSv4 error %d\n",
                                __func__, -err);