From b0230e8adc56aed52f09f5d439440d422735993a Mon Sep 17 00:00:00 2001 From: panqiangbiao Date: Fri, 17 Nov 2023 00:02:18 +0800 Subject: [PATCH] add dentry Signed-off-by: panqiangbiao Change-Id: I7be9d8ea8fa15b28ac788a4ab80f49799b275263 --- fs/hmdfs/dentry.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/fs/hmdfs/dentry.c b/fs/hmdfs/dentry.c index 040d698e1785..104f8837193f 100644 --- a/fs/hmdfs/dentry.c +++ b/fs/hmdfs/dentry.c @@ -75,7 +75,8 @@ static int hmdfs_dev_d_revalidate(struct dentry *direntry, unsigned int flags) { struct inode *dinode = NULL; struct hmdfs_inode_info *info = NULL; - + hmdfs_info("hmdfs_dev_d_revalidate Failed to alloc a peer d_inode(direntry); done"); + return 1; spin_lock(&direntry->d_lock); if (IS_ROOT(direntry)) { spin_unlock(&direntry->d_lock); @@ -84,17 +85,22 @@ static int hmdfs_dev_d_revalidate(struct dentry *direntry, unsigned int flags) spin_unlock(&direntry->d_lock); dinode = d_inode(direntry); + hmdfs_info("hmdfs_dev_d_revalidate Failed to alloc a peer d_inode(direntry); done"); if (!dinode) + hmdfs_info("hmdfs_dev_d_revalidate if (!dinode): return 0;"); return 0; info = hmdfs_i(dinode); if (info->inode_type == HMDFS_LAYER_SECOND_LOCAL || - info->inode_type == HMDFS_LAYER_FIRST_DEVICE) { + info->inode_type == HMDFS_LAYER_FIRST_DEVICE || + info->inode_type == HMDFS_LAYER_OTHER_LOCAL) { + hmdfs_info("hmdfs_dev_d_revalidate inode_type: %s: return 1", info->inode_type); return 1; } if (info->conn && info->conn->status == NODE_STAT_ONLINE) return 1; - + + hmdfs_info("hmdfs_dev_d_revalidate done inode_type: %s: return 1", info->inode_type); return 0; } -- Gitee