dpu-utilities/0009-get-mount-pointer-error-when-remote-mount-path-is-sa.patch

28 lines
907 B
Diff
Raw Normal View History

From 4352197e314767a644c46b43a08fc02b67d9dd63 Mon Sep 17 00:00:00 2001
From: liqiang <liqiang64@huawei.com>
Date: Tue, 12 Dec 2023 11:53:18 +0800
Subject: [PATCH 09/12] get mount pointer error when remote mount path is same
as local path
Signed-off-by: liqiang <liqiang64@huawei.com>
---
qtfs/qtfs/sb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qtfs/qtfs/sb.c b/qtfs/qtfs/sb.c
index fb60261..68ed8d8 100644
--- a/qtfs/qtfs/sb.c
+++ b/qtfs/qtfs/sb.c
@@ -107,7 +107,7 @@ static inline char *qtfs_mountpoint_path_init(struct dentry *dentry, struct path
if (IS_ERR_OR_NULL(ret)) {
qtfs_err("d_absolute_path failed:%ld", QTFS_PTR_ERR(ret));
} else {
- if (strcmp(mnt_file, "/")) {
+ if (strcmp(ret, mnt_file) != 0 && strcmp(mnt_file, "/")) {
mnt_point = strstr(ret, mnt_file);
qtfs_info("mnt point:%s", mnt_point);
if (mnt_point) {
--
2.37.1 (Apple Git-137.1)