node.c (df7686101956929dcea410971656e34926773b88) node.c (0a4c92657f2543bb8fd480c5af90c6bb87f18e00)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * fs/f2fs/node.c
4 *
5 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
6 * http://www.samsung.com/
7 */
8#include <linux/fs.h>

--- 602 unchanged lines hidden (view full) ---

611 return pgofs + 1;
612
613 while (max_level-- > cur_level)
614 skipped_unit *= NIDS_PER_BLOCK;
615
616 switch (dn->max_level) {
617 case 3:
618 base += 2 * indirect_blks;
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * fs/f2fs/node.c
4 *
5 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
6 * http://www.samsung.com/
7 */
8#include <linux/fs.h>

--- 602 unchanged lines hidden (view full) ---

611 return pgofs + 1;
612
613 while (max_level-- > cur_level)
614 skipped_unit *= NIDS_PER_BLOCK;
615
616 switch (dn->max_level) {
617 case 3:
618 base += 2 * indirect_blks;
619 /* fall through */
619 case 2:
620 base += 2 * direct_blks;
620 case 2:
621 base += 2 * direct_blks;
622 /* fall through */
621 case 1:
622 base += direct_index;
623 break;
624 default:
625 f2fs_bug_on(F2FS_I_SB(dn->inode), 1);
626 }
627
628 return ((pgofs - base) / skipped_unit + 1) * skipped_unit + base;

--- 2542 unchanged lines hidden ---
623 case 1:
624 base += direct_index;
625 break;
626 default:
627 f2fs_bug_on(F2FS_I_SB(dn->inode), 1);
628 }
629
630 return ((pgofs - base) / skipped_unit + 1) * skipped_unit + base;

--- 2542 unchanged lines hidden ---