inode.c (832ee62d992d9b2d599a6dc70ac822dec4557ea4) inode.c (b7446e7cf15f0926866c8e5de90ab278998bf8c8)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * linux/fs/ext4/inode.c
4 *
5 * Copyright (C) 1992, 1993, 1994, 1995
6 * Remy Card (card@masi.ibp.fr)
7 * Laboratoire MASI - Institut Blaise Pascal
8 * Universite Pierre et Marie Curie (Paris VI)

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

1166 /*
1167 * grab_cache_page_write_begin() can take a long time if the
1168 * system is thrashing due to memory pressure, or if the page
1169 * is being written back. So grab it first before we start
1170 * the transaction handle. This also allows us to allocate
1171 * the page (if needed) without using GFP_NOFS.
1172 */
1173retry_grab:
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * linux/fs/ext4/inode.c
4 *
5 * Copyright (C) 1992, 1993, 1994, 1995
6 * Remy Card (card@masi.ibp.fr)
7 * Laboratoire MASI - Institut Blaise Pascal
8 * Universite Pierre et Marie Curie (Paris VI)

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

1166 /*
1167 * grab_cache_page_write_begin() can take a long time if the
1168 * system is thrashing due to memory pressure, or if the page
1169 * is being written back. So grab it first before we start
1170 * the transaction handle. This also allows us to allocate
1171 * the page (if needed) without using GFP_NOFS.
1172 */
1173retry_grab:
1174 page = grab_cache_page_write_begin(mapping, index, flags);
1174 page = grab_cache_page_write_begin(mapping, index);
1175 if (!page)
1176 return -ENOMEM;
1177 unlock_page(page);
1178
1179retry_journal:
1180 handle = ext4_journal_start(inode, EXT4_HT_WRITE_PAGE, needed_blocks);
1181 if (IS_ERR(handle)) {
1182 put_page(page);

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

2958 pagep, fsdata);
2959 if (ret < 0)
2960 return ret;
2961 if (ret == 1)
2962 return 0;
2963 }
2964
2965retry:
1175 if (!page)
1176 return -ENOMEM;
1177 unlock_page(page);
1178
1179retry_journal:
1180 handle = ext4_journal_start(inode, EXT4_HT_WRITE_PAGE, needed_blocks);
1181 if (IS_ERR(handle)) {
1182 put_page(page);

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

2958 pagep, fsdata);
2959 if (ret < 0)
2960 return ret;
2961 if (ret == 1)
2962 return 0;
2963 }
2964
2965retry:
2966 page = grab_cache_page_write_begin(mapping, index, flags);
2966 page = grab_cache_page_write_begin(mapping, index);
2967 if (!page)
2968 return -ENOMEM;
2969
2970 /* In case writeback began while the page was unlocked */
2971 wait_for_stable_page(page);
2972
2973#ifdef CONFIG_FS_ENCRYPTION
2974 ret = ext4_block_write_begin(page, pos, len,

--- 3216 unchanged lines hidden ---
2967 if (!page)
2968 return -ENOMEM;
2969
2970 /* In case writeback began while the page was unlocked */
2971 wait_for_stable_page(page);
2972
2973#ifdef CONFIG_FS_ENCRYPTION
2974 ret = ext4_block_write_begin(page, pos, len,

--- 3216 unchanged lines hidden ---