]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
debugfs: fix placement of EXPORT_SYMBOL_GPL for debugfs_create_str()
authorGui-Dong Han <hanguidong02@gmail.com>
Mon, 23 Mar 2026 08:58:45 +0000 (16:58 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 2 Apr 2026 14:15:23 +0000 (16:15 +0200)
The EXPORT_SYMBOL_GPL() for debugfs_create_str was placed incorrectly
away from the function definition. Move it immediately below the
debugfs_create_str() function where it belongs.

Fixes: d60b59b96795 ("debugfs: Export debugfs_create_str symbol")
Signed-off-by: Gui-Dong Han <hanguidong02@gmail.com>
Link: https://patch.msgid.link/20260323085930.88894-3-hanguidong02@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/debugfs/file.c

index a941d73251b0631e15b647b79cd75301f6421c12..edd6aafbfbaaf3234d6894acc1307f5fcf12a65e 100644 (file)
@@ -1047,7 +1047,6 @@ ssize_t debugfs_read_file_str(struct file *file, char __user *user_buf,
 
        return ret;
 }
-EXPORT_SYMBOL_GPL(debugfs_create_str);
 
 static ssize_t debugfs_write_file_str(struct file *file, const char __user *user_buf,
                                      size_t count, loff_t *ppos)
@@ -1142,6 +1141,7 @@ void debugfs_create_str(const char *name, umode_t mode,
        debugfs_create_mode_unsafe(name, mode, parent, value, &fops_str,
                                   &fops_str_ro, &fops_str_wo);
 }
+EXPORT_SYMBOL_GPL(debugfs_create_str);
 
 static ssize_t read_file_blob(struct file *file, char __user *user_buf,
                              size_t count, loff_t *ppos)