From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755576AbdCKApR (ORCPT ); Fri, 10 Mar 2017 19:45:17 -0500 Received: from mail-pg0-f67.google.com ([74.125.83.67]:36131 "EHLO mail-pg0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755406AbdCKApI (ORCPT ); Fri, 10 Mar 2017 19:45:08 -0500 From: Geliang Tang To: Greg Kroah-Hartman Cc: Geliang Tang , linux-kernel@vger.kernel.org Subject: [PATCH] debugfs: set no_llseek in DEFINE_DEBUGFS_ATTRIBUTE Date: Sat, 11 Mar 2017 08:44:57 +0800 Message-Id: <69f0f4a1d271947fae2a2574bae60c704b74b3ca.1489033126.git.geliangtang@gmail.com> X-Mailer: git-send-email 2.9.3 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- include/linux/debugfs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/debugfs.h b/include/linux/debugfs.h index 7dff776..9174b0d 100644 --- a/include/linux/debugfs.h +++ b/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) -- 2.9.3