Re: [PATCH 3/4] ubifs: Use a folio in do_truncation()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



在 2023/6/6 1:05, Matthew Wilcox 写道:
On Mon, Jun 05, 2023 at 05:50:28PM +0100, Matthew Wilcox (Oracle) wrote:
Convert from the old page APIs to the new folio APIs which saves
a few hidden calls to compound_head().

Argh.  This fix was supposed to be folded in.


diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c
index 1b2055d5ec5f..67cf5138ccc4 100644
--- a/fs/ubifs/file.c
+++ b/fs/ubifs/file.c
@@ -1161,7 +1161,7 @@ static int do_truncation(struct ubifs_info *c, struct inode *inode,
  		struct folio *folio;
folio = filemap_lock_folio(inode->i_mapping, index);
-		if (folio) {
+		if (!IS_ERR(folio)) {
  			if (folio_test_dirty(folio)) {
  				/*
  				 * 'ubifs_jnl_truncate()' will try to truncate
.



Reviewed-by: Zhihao Cheng <chengzhihao1@xxxxxxxxxx>



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux