file.c (651a88798412e216f337d70181127e847f00a4b7) | file.c (b7446e7cf15f0926866c8e5de90ab278998bf8c8) |
---|---|
1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * This file is part of UBIFS. 4 * 5 * Copyright (C) 2006-2008 Nokia Corporation. 6 * 7 * Authors: Artem Bityutskiy (Битюцкий Артём) 8 * Adrian Hunter --- 230 unchanged lines hidden (view full) --- 239 if (appending) 240 /* We are appending data, budget for inode change */ 241 req.dirtied_ino = 1; 242 243 err = ubifs_budget_space(c, &req); 244 if (unlikely(err)) 245 return err; 246 | 1// SPDX-License-Identifier: GPL-2.0-only 2/* 3 * This file is part of UBIFS. 4 * 5 * Copyright (C) 2006-2008 Nokia Corporation. 6 * 7 * Authors: Artem Bityutskiy (Битюцкий Артём) 8 * Adrian Hunter --- 230 unchanged lines hidden (view full) --- 239 if (appending) 240 /* We are appending data, budget for inode change */ 241 req.dirtied_ino = 1; 242 243 err = ubifs_budget_space(c, &req); 244 if (unlikely(err)) 245 return err; 246 |
247 page = grab_cache_page_write_begin(mapping, index, flags); | 247 page = grab_cache_page_write_begin(mapping, index); |
248 if (unlikely(!page)) { 249 ubifs_release_budget(c, &req); 250 return -ENOMEM; 251 } 252 253 if (!PageUptodate(page)) { 254 if (!(pos & ~PAGE_MASK) && len == PAGE_SIZE) 255 SetPageChecked(page); --- 176 unchanged lines hidden (view full) --- 432 433 ubifs_assert(c, ubifs_inode(inode)->ui_size == inode->i_size); 434 ubifs_assert(c, !c->ro_media && !c->ro_mount); 435 436 if (unlikely(c->ro_error)) 437 return -EROFS; 438 439 /* Try out the fast-path part first */ | 248 if (unlikely(!page)) { 249 ubifs_release_budget(c, &req); 250 return -ENOMEM; 251 } 252 253 if (!PageUptodate(page)) { 254 if (!(pos & ~PAGE_MASK) && len == PAGE_SIZE) 255 SetPageChecked(page); --- 176 unchanged lines hidden (view full) --- 432 433 ubifs_assert(c, ubifs_inode(inode)->ui_size == inode->i_size); 434 ubifs_assert(c, !c->ro_media && !c->ro_mount); 435 436 if (unlikely(c->ro_error)) 437 return -EROFS; 438 439 /* Try out the fast-path part first */ |
440 page = grab_cache_page_write_begin(mapping, index, flags); | 440 page = grab_cache_page_write_begin(mapping, index); |
441 if (unlikely(!page)) 442 return -ENOMEM; 443 444 if (!PageUptodate(page)) { 445 /* The page is not loaded from the flash */ 446 if (!(pos & ~PAGE_MASK) && len == PAGE_SIZE) { 447 /* 448 * We change whole page so no need to load it. But we --- 1239 unchanged lines hidden --- | 441 if (unlikely(!page)) 442 return -ENOMEM; 443 444 if (!PageUptodate(page)) { 445 /* The page is not loaded from the flash */ 446 if (!(pos & ~PAGE_MASK) && len == PAGE_SIZE) { 447 /* 448 * We change whole page so no need to load it. But we --- 1239 unchanged lines hidden --- |