Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5f46be04 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

pNFS: Cleanup - don't open code pnfs_mark_layout_stateid_invalid()



Ensure nfs42_layoutstat_done() layoutget don't open code layout stateid
invalidation.

Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent e036f464
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -336,8 +336,7 @@ nfs42_layoutstat_done(struct rpc_task *task, void *calldata)
			 * Mark the bad layout state as invalid, then retry
			 * with the current stateid.
			 */
			set_bit(NFS_LAYOUT_INVALID_STID, &lo->plh_flags);
			pnfs_mark_matching_lsegs_invalid(lo, &head, NULL, 0);
			pnfs_mark_layout_stateid_invalid(lo, &head);
			spin_unlock(&inode->i_lock);
			pnfs_free_lseg_list(&head);
		} else
+1 −2
Original line number Diff line number Diff line
@@ -7931,8 +7931,7 @@ nfs4_layoutget_handle_exception(struct rpc_task *task,
			 * Mark the bad layout state as invalid, then retry
			 * with the current stateid.
			 */
			set_bit(NFS_LAYOUT_INVALID_STID, &lo->plh_flags);
			pnfs_mark_matching_lsegs_invalid(lo, &head, NULL, 0);
			pnfs_mark_layout_stateid_invalid(lo, &head);
			spin_unlock(&inode->i_lock);
			pnfs_free_lseg_list(&head);
			status = -EAGAIN;
+1 −1
Original line number Diff line number Diff line
@@ -259,7 +259,7 @@ pnfs_put_layout_hdr(struct pnfs_layout_hdr *lo)
 * is required.
 * Note that caller must hold inode->i_lock.
 */
static int
int
pnfs_mark_layout_stateid_invalid(struct pnfs_layout_hdr *lo,
		struct list_head *lseg_list)
{
+2 −0
Original line number Diff line number Diff line
@@ -268,6 +268,8 @@ int pnfs_mark_matching_lsegs_return(struct pnfs_layout_hdr *lo,
				struct list_head *tmp_list,
				const struct pnfs_layout_range *recall_range,
				u32 seq);
int pnfs_mark_layout_stateid_invalid(struct pnfs_layout_hdr *lo,
		struct list_head *lseg_list);
bool pnfs_roc(struct inode *ino);
void pnfs_roc_release(struct inode *ino);
void pnfs_roc_set_barrier(struct inode *ino, u32 barrier);