fslog.c (7e24a55b2122746c2eef192296fc84624354f895) | fslog.c (5e20797c824b1865c0a79fb2ae690dce40b9812e) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * 4 * Copyright (C) 2019-2021 Paragon Software GmbH, All rights reserved. 5 * 6 */ 7 8#include <linux/blkdev.h> --- 595 unchanged lines hidden (view full) --- 604 cr->next_client = *head; 605 606 if (*head != LFS_NO_CLIENT_LE) 607 ca[le16_to_cpu(*head)].prev_client = cpu_to_le16(index); 608 609 *head = cpu_to_le16(index); 610} 611 | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * 4 * Copyright (C) 2019-2021 Paragon Software GmbH, All rights reserved. 5 * 6 */ 7 8#include <linux/blkdev.h> --- 595 unchanged lines hidden (view full) --- 604 cr->next_client = *head; 605 606 if (*head != LFS_NO_CLIENT_LE) 607 ca[le16_to_cpu(*head)].prev_client = cpu_to_le16(index); 608 609 *head = cpu_to_le16(index); 610} 611 |
612/* 613 * Enumerate restart table. 614 * 615 * @t - table to enumerate. 616 * @c - current enumerated element. 617 * 618 * enumeration starts with @c == NULL 619 * returns next element or NULL 620 */ |
|
612static inline void *enum_rstbl(struct RESTART_TABLE *t, void *c) 613{ 614 __le32 *e; 615 u32 bprt; | 621static inline void *enum_rstbl(struct RESTART_TABLE *t, void *c) 622{ 623 __le32 *e; 624 u32 bprt; |
616 u16 rsize = t ? le16_to_cpu(t->size) : 0; | 625 u16 rsize; |
617 | 626 |
627 if (!t) 628 return NULL; 629 630 rsize = le16_to_cpu(t->size); 631 |
|
618 if (!c) { | 632 if (!c) { |
619 if (!t || !t->total) | 633 /* start enumeration. */ 634 if (!t->total) |
620 return NULL; 621 e = Add2Ptr(t, sizeof(struct RESTART_TABLE)); 622 } else { 623 e = Add2Ptr(c, rsize); 624 } 625 626 /* Loop until we hit the first one allocated, or the end of the list. */ 627 for (bprt = bytes_per_rt(t); PtrOffset(t, e) < bprt; --- 4595 unchanged lines hidden --- | 635 return NULL; 636 e = Add2Ptr(t, sizeof(struct RESTART_TABLE)); 637 } else { 638 e = Add2Ptr(c, rsize); 639 } 640 641 /* Loop until we hit the first one allocated, or the end of the list. */ 642 for (bprt = bytes_per_rt(t); PtrOffset(t, e) < bprt; --- 4595 unchanged lines hidden --- |