Skip to content

Commit d01c6ed

Browse files
author
Trond Myklebust
committed
NFS4.x/pnfs: Fix up logging of layout stateids
If the layout is invalid, then just log a '0' value. Signed-off-by: Trond Myklebust <[email protected]>
1 parent 5776a9c commit d01c6ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

fs/nfs/nfs4trace.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1815,7 +1815,7 @@ TRACE_EVENT(pnfs_update_layout,
18151815
__entry->count = count;
18161816
__entry->iomode = iomode;
18171817
__entry->reason = reason;
1818-
if (lo != NULL) {
1818+
if (lo != NULL && pnfs_layout_is_valid(lo)) {
18191819
__entry->layoutstateid_seq =
18201820
be32_to_cpu(lo->plh_stateid.seqid);
18211821
__entry->layoutstateid_hash =
@@ -1869,7 +1869,7 @@ DECLARE_EVENT_CLASS(pnfs_layout_event,
18691869
__entry->pos = pos;
18701870
__entry->count = count;
18711871
__entry->iomode = iomode;
1872-
if (lo != NULL) {
1872+
if (lo != NULL && pnfs_layout_is_valid(lo)) {
18731873
__entry->layoutstateid_seq =
18741874
be32_to_cpu(lo->plh_stateid.seqid);
18751875
__entry->layoutstateid_hash =

0 commit comments

Comments
 (0)