lkml.org 
[lkml]   [2023]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] xfs: xfs_nfs_get_inode support zero generation
Date
From: Ren Lei <renlei1@chinatelecom.cn>

If generation is zero, bypass the verification of generation number
to avoid stale file error. (Be consistent with other fs, such as
ext4, fat, jfs, etc.)

Signed-off-by: Ren Lei<renlei1@chinatelecom.cn>
---
fs/xfs/xfs_export.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xfs/xfs_export.c b/fs/xfs/xfs_export.c
index 1064c2342876..cbee32c5ad37 100644
--- a/fs/xfs/xfs_export.c
+++ b/fs/xfs/xfs_export.c
@@ -146,7 +146,7 @@ xfs_nfs_get_inode(
return ERR_PTR(error);
}

- if (VFS_I(ip)->i_generation != generation) {
+ if (generation && VFS_I(ip)->i_generation != generation) {
xfs_irele(ip);
return ERR_PTR(-ESTALE);
}
--
2.27.0
\
 
 \ /
  Last update: 2023-05-11 12:29    [W:0.062 / U:0.204 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site