Blame SOURCES/rhbz1997192.patch

36b929
commit 47cab810bb7ea315a2dec23c2f61e7ba74515b82
36b929
Author: Martin Cermak <mcermak@redhat.com>
36b929
Date:   Fri Dec 16 16:08:20 2022 -0500
36b929
36b929
    tapset: nfs.proc.commit_done compilation on some kernels
36b929
    
36b929
    Correct:
36b929
    9.0 Server x86_64 # stap -vp3 nfs.proc.commit_done.stp
36b929
    
36b929
    Pass 1: parsed user script and 482 library scripts using 108088virt/88468res/12460shr/75476data kb, in 190usr/60sys/501real ms.
36b929
    semantic error: invalid access '->task' vs 'void*': operator '->' at /usr/share/systemtap/tapset/linux/nfs_proc.stpm:16:21
36b929
            source:         ( get_ip(&@nfs_data->task) )
36b929
                                               ^
36b929
            in expansion of macro: operator '@_nfs_data_server_ip' at /usr/share/systemtap/tapset/linux/nfs_proc.stp:1421:15
36b929
            source:                 server_ip = @_nfs_data_server_ip($task->tk_calldata)
36b929
                                                ^
36b929
36b929
diff --git a/tapset/linux/nfs_proc.stp b/tapset/linux/nfs_proc.stp
36b929
index 9b1f65f5f..4413384f9 100644
36b929
--- a/tapset/linux/nfs_proc.stp
36b929
+++ b/tapset/linux/nfs_proc.stp
36b929
@@ -1442,10 +1442,11 @@ probe nfs.proc3.commit_done = kernel.function("nfs3_commit_done") !,
36b929
 		valid = @_nfs_data_valid($data)
36b929
 	}
36b929
 	else {
36b929
-		server_ip = @_nfs_data_server_ip($task->tk_calldata)
36b929
-		prot = @_nfs_data_prot($task->tk_calldata)
36b929
-		count = @_nfs_data_res_count($task->tk_calldata)
36b929
-		valid = @_nfs_data_valid($task->tk_calldata)
36b929
+                _tk_calldata=@choose_defined($task->tk_calldata, @cast($task, "rpc_task", "kernel:nfs")->tk_calldata)
36b929
+                server_ip = @_nfs_data_server_ip(_tk_calldata)
36b929
+                prot = @_nfs_data_prot(_tk_calldata)
36b929
+                count = @_nfs_data_res_count(_tk_calldata)
36b929
+                valid = @_nfs_data_valid(_tk_calldata)
36b929
 	}
36b929
 	timestamp = 0
36b929
 	version = 3
36b929
diff --git a/tapset/linux/nfs_proc.stpm b/tapset/linux/nfs_proc.stpm
36b929
index 8576c0f33..4fe40b2a5 100644
36b929
--- a/tapset/linux/nfs_proc.stpm
36b929
+++ b/tapset/linux/nfs_proc.stpm
36b929
@@ -13,7 +13,7 @@
36b929
 
36b929
 @define _nfs_data_server_ip(nfs_data)
36b929
 %(
36b929
-	( get_ip(&@nfs_data->task) )
36b929
+	( get_ip(@choose_defined(&@nfs_data->task, &@cast(@nfs_data, "nfs_commit_data", "kernel:nfs")->task)) )
36b929
 %)
36b929
 
36b929
 @define _nfs_data_prot(nfs_data)