1f2f23ddef
Resolves: bz#1350745 bz#1362129 bz#1541568 bz#1597252 bz#1599220 Resolves: bz#1633177 bz#1637564 bz#1639476 bz#1639568 bz#1643370 Resolves: bz#1645480 bz#1648296 bz#1648893 bz#1651040 bz#1651460 Resolves: bz#1652466 bz#1652537 bz#1653224 bz#1653613 bz#1654103 Resolves: bz#1654161 bz#1655385 bz#1655578 bz#1656357 bz#1659439 Signed-off-by: Milind Changire <mchangir@redhat.com>
49 lines
1.9 KiB
Diff
49 lines
1.9 KiB
Diff
From 4a3e8888d7e866137287fced284b71ba152a17ad Mon Sep 17 00:00:00 2001
|
|
From: Jiffin Tony Thottan <jthottan@redhat.com>
|
|
Date: Thu, 29 Nov 2018 19:22:40 +0530
|
|
Subject: [PATCH 469/493] nfs : set ctx for every inode looked up
|
|
nfs3_fh_resolve_inode_lookup_cbk()
|
|
|
|
The inode ctx for nfs xlator is set with help nfs_fix_generation.
|
|
But currently gnfs is crashing because inode_ctx is becoming null
|
|
nfs3_resolve_inode_hard() is used to perform a lookup on entire
|
|
path and looks like function is missing to set the ctx for inode.
|
|
This patch will set ctx for the inode which it looked on.
|
|
|
|
Upstream reference :
|
|
>url: https://review.gluster.org/#/c/glusterfs/+/21749/
|
|
>Change-Id: I464fa7f78df1bae990ebe97de8ccf6d5fb74fc9f
|
|
>fixes: bz#1651439
|
|
>Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
|
|
|
|
Change-Id: I464fa7f78df1bae990ebe97de8ccf6d5fb74fc9f
|
|
BUG: 1633177
|
|
Signed-off-by: Jiffin Tony Thottan <jthottan@redhat.com>
|
|
Reviewed-on: https://code.engineering.redhat.com/gerrit/158676
|
|
Tested-by: RHGS Build Bot <nigelb@redhat.com>
|
|
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
|
|
---
|
|
xlators/nfs/server/src/nfs3-helpers.c | 6 ++++++
|
|
1 file changed, 6 insertions(+)
|
|
|
|
diff --git a/xlators/nfs/server/src/nfs3-helpers.c b/xlators/nfs/server/src/nfs3-helpers.c
|
|
index 0b97709..9bc8aff 100644
|
|
--- a/xlators/nfs/server/src/nfs3-helpers.c
|
|
+++ b/xlators/nfs/server/src/nfs3-helpers.c
|
|
@@ -3660,6 +3660,12 @@ nfs3_fh_resolve_entry_lookup_cbk (call_frame_t *frame, void *cookie,
|
|
inode_lookup (linked_inode);
|
|
inode_unref (cs->resolvedloc.inode);
|
|
cs->resolvedloc.inode = linked_inode;
|
|
+ } else {
|
|
+ /* nfs3_fh_resolve_entry_hard() use to resolve entire path if needed.
|
|
+ * So the ctx for inode obtained from here need to set properly,
|
|
+ * otherwise it may result in a crash.
|
|
+ */
|
|
+ nfs_fix_generation(this, inode);
|
|
}
|
|
err:
|
|
nfs3_call_resume (cs);
|
|
--
|
|
1.8.3.1
|
|
|