Skip to content

Commit

Permalink
debugfs: set no_llseek in DEFINE_DEBUGFS_ATTRIBUTE
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Geliang Tang authored and Greg Kroah-Hartman committed Apr 8, 2017
1 parent 96fb7e2 commit 895ce6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/debugfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 895ce6c

Please sign in to comment.