瀏覽代碼

debugfs: set no_llseek in DEFINE_DEBUGFS_ATTRIBUTE

In DEFINE_DEBUGFS_ATTRIBUTE() macro, since we use nonseekable_open() to
open, we should use no_llseek() to seek, not generic_file_llseek().

Signed-off-by: Geliang Tang <geliangtang@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Geliang Tang 8 年之前
父節點
當前提交
895ce6c877
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      include/linux/debugfs.h

+ 1 - 1
include/linux/debugfs.h

@@ -74,7 +74,7 @@ static const struct file_operations __fops = {				\
 	.release = simple_attr_release,					\
 	.read	 = debugfs_attr_read,					\
 	.write	 = debugfs_attr_write,					\
-	.llseek  = generic_file_llseek,					\
+	.llseek  = no_llseek,						\
 }
 
 #if defined(CONFIG_DEBUG_FS)