aboutsummaryrefslogtreecommitdiffstats
path: root/fs/tracefs/inode.c
diff options
context:
space:
mode:
authorBartosz Golaszewski <[email protected]>2023-12-18 12:31:29 +0000
committerBartosz Golaszewski <[email protected]>2023-12-18 12:31:29 +0000
commit12b7f4ddfcb66dafed432cf4a987f5b40179c0f1 (patch)
tree1e57a7d047e575d891302fb68fdfcd682fe84a5f /fs/tracefs/inode.c
parentdt-bindings: gpio: dwapb: allow gpio-ranges (diff)
parentdevice property: Implement device_is_big_endian() (diff)
downloadkernel-12b7f4ddfcb66dafed432cf4a987f5b40179c0f1.tar.gz
kernel-12b7f4ddfcb66dafed432cf4a987f5b40179c0f1.zip
Merge tag 'device_is_big_endian-6.8-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core into gpio/for-next
Tag for the device_is_big_endian() addition to property.h For others to be able to pull from in a stable way. Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'fs/tracefs/inode.c')
-rw-r--r--fs/tracefs/inode.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/fs/tracefs/inode.c b/fs/tracefs/inode.c
index 5b54948514fe..ae648deed019 100644
--- a/fs/tracefs/inode.c
+++ b/fs/tracefs/inode.c
@@ -509,20 +509,15 @@ struct dentry *eventfs_start_creating(const char *name, struct dentry *parent)
struct dentry *dentry;
int error;
+ /* Must always have a parent. */
+ if (WARN_ON_ONCE(!parent))
+ return ERR_PTR(-EINVAL);
+
error = simple_pin_fs(&trace_fs_type, &tracefs_mount,
&tracefs_mount_count);
if (error)
return ERR_PTR(error);
- /*
- * If the parent is not specified, we create it in the root.
- * We need the root dentry to do this, which is in the super
- * block. A pointer to that is in the struct vfsmount that we
- * have around.
- */
- if (!parent)
- parent = tracefs_mount->mnt_root;
-
if (unlikely(IS_DEADDIR(parent->d_inode)))
dentry = ERR_PTR(-ENOENT);
else