Return-Path: Received: from mail-qk0-f193.google.com ([209.85.220.193]:36117 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932692AbcITQ4z (ORCPT ); Tue, 20 Sep 2016 12:56:55 -0400 Received: by mail-qk0-f193.google.com with SMTP id z143so1432914qka.3 for ; Tue, 20 Sep 2016 09:56:55 -0700 (PDT) From: Trond Myklebust To: anna.schumaker@netapp.com Cc: linux-nfs@vger.kernel.org, Oleg Drokin Subject: [PATCH v6 28/29] NFSv4: Open state recovery must account for file permission changes Date: Tue, 20 Sep 2016 12:56:10 -0400 Message-Id: <1474390571-17106-29-git-send-email-trond.myklebust@primarydata.com> In-Reply-To: <1474390571-17106-28-git-send-email-trond.myklebust@primarydata.com> References: <1474390571-17106-1-git-send-email-trond.myklebust@primarydata.com> <1474390571-17106-2-git-send-email-trond.myklebust@primarydata.com> <1474390571-17106-3-git-send-email-trond.myklebust@primarydata.com> <1474390571-17106-4-git-send-email-trond.myklebust@primarydata.com> <1474390571-17106-5-git-send-email-trond.myklebust@primarydata.com> <1474390571-17106-6-git-send-email-trond.myklebust@primarydata.com> <1474390571-17106-7-git-send-email-trond.myklebust@primarydata.com> <1474390571-17106-8-git-send-email-trond.myklebust@primarydata.com> <1474390571-17106-9-git-send-email-trond.myklebust@primarydata.com> <1474390571-17106-10-git-send-email-trond.myklebust@primarydata.com> <1474390571-17106-11-git-send-email-trond.myklebust@primarydata.com> <1474390571-17106-12-git-send-email-trond.myklebust@primarydata.com> <1474390571-17106-13-git-send-email-trond.myklebust@primarydata.com> <1474390571-17106-14-git-send-email-trond.myklebust@primarydata.com> <1474390571-17106-15-git-send-email-trond.myklebust@primarydata.com> <1474390571-17106-16-git-send-email-trond.myklebust@primarydata.com> <1474390571-17106-17-git-send-email-trond.myklebust@primarydata.com> <1474390571-17106-18-git-send-email-trond.myklebust@primarydata.com> <1474390571-17106-19-git-send-email-trond.myklebust@primarydata.com> <1474390571-17106-20-git-send-email-trond.myklebust@primarydata.com> <1474390571-17106-21-git-send-email-trond.myklebust@primarydata.com> <1474390571-17106-22-git-send-email-trond.myklebust@primarydata.com> <1474390571-17106-23-git-send-email-trond.myklebust@primarydata.com> <1474390571-17106-24-git-send-email-trond.myklebust@primarydata.com> <1474390571-17106-25-git-send-email-trond.myklebust@primarydata.com> <1474390571-17106-26-git-send-email-trond.myklebust@primarydata.com> <1474390571-17106-27-git-send-email-trond.myklebust@primarydata.com> <1474390571-17106-28-git-send-email-trond.myklebust@primarydata.com> Sender: linux-nfs-owner@vger.kernel.org List-ID: If the file permissions change on the server, then we may not be able to recover open state. If so, we need to ensure that we mark the file descriptor appropriately. Cc: stable@vger.kernel.org Signed-off-by: Trond Myklebust --- fs/nfs/nfs4state.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 609643f31e7a..79366b69ae34 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c @@ -1532,6 +1532,9 @@ restart: __func__, status); case -ENOENT: case -ENOMEM: + case -EACCES: + case -EROFS: + case -EIO: case -ESTALE: /* Open state on this file cannot be recovered */ nfs4_state_mark_recovery_failed(state, status); -- 2.7.4