summaryrefslogtreecommitdiffstats
path: root/fs/afs/dir.c
diff options
context:
space:
mode:
authorDavid Howells <dhowells@redhat.com>2019-04-25 15:26:51 +0200
committerDavid Howells <dhowells@redhat.com>2019-04-25 15:26:51 +0200
commit80548b03991f58758a336424a90bf9f988e3b077 (patch)
tree4d4872497df5a5794d9eb4ca352d4d33fa30798b /fs/afs/dir.c
parentafs: Implement sillyrename for unlink and rename (diff)
downloadlinux-80548b03991f58758a336424a90bf9f988e3b077.tar.xz
linux-80548b03991f58758a336424a90bf9f988e3b077.zip
afs: Add more tracepoints
Add four more tracepoints: (1) afs_make_fs_call1 - Split from afs_make_fs_call but takes a filename to log also. (2) afs_make_fs_call2 - Like the above but takes two filenames to log. (3) afs_lookup - Log the result of doing a successful lookup, including a negative result (fid 0:0). (4) afs_get_tree - Log the set up of a volume for mounting. It also extends the name buffer on the afs_edit_dir tracepoint to 24 chars and puts quotes around the filename in the text representation. Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/dir.c')
-rw-r--r--fs/afs/dir.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/afs/dir.c b/fs/afs/dir.c
index 6c8523501639..48706eefc63b 100644
--- a/fs/afs/dir.c
+++ b/fs/afs/dir.c
@@ -908,8 +908,14 @@ static struct dentry *afs_lookup(struct inode *dir, struct dentry *dentry,
(void *)(unsigned long)dvnode->status.data_version;
}
d = d_splice_alias(inode, dentry);
- if (!IS_ERR_OR_NULL(d))
+ if (!IS_ERR_OR_NULL(d)) {
d->d_fsdata = dentry->d_fsdata;
+ trace_afs_lookup(dvnode, &d->d_name,
+ inode ? AFS_FS_I(inode) : NULL);
+ } else {
+ trace_afs_lookup(dvnode, &dentry->d_name,
+ inode ? AFS_FS_I(inode) : NULL);
+ }
return d;
}