nfs4.1: mark layout as bad on error path in _pnfs_return_layout

Signed-off-by: Fred Isaman <iisaman@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
Fred Isaman 2011-06-15 14:32:02 -04:00 committed by Trond Myklebust
parent ea0ded748b
commit 9e2dfdb308
1 changed files with 2 additions and 0 deletions

View File

@ -652,6 +652,8 @@ _pnfs_return_layout(struct inode *ino)
lrp = kzalloc(sizeof(*lrp), GFP_KERNEL);
if (unlikely(lrp == NULL)) {
status = -ENOMEM;
set_bit(NFS_LAYOUT_RW_FAILED, &lo->plh_flags);
set_bit(NFS_LAYOUT_RO_FAILED, &lo->plh_flags);
put_layout_hdr(lo);
goto out;
}