Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1636924

[PATCH] fs: set no_llseek in DEFINE_SIMPLE_ATTRIBUTE

From Geliang Tang <geliangtang@gmail.com>
Newsgroups linux.kernel
Subject [PATCH] fs: set no_llseek in DEFINE_SIMPLE_ATTRIBUTE
Date 2017-05-06 17:40 +0200
Message-ID <tE9Ym-1qG-3@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


In DEFINE_SIMPLE_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>
---
 include/linux/fs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/fs.h b/include/linux/fs.h
index 9ea93c6..8762287 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -3117,7 +3117,7 @@ static const struct file_operations __fops = {				\
 	.release = simple_attr_release,					\
 	.read	 = simple_attr_read,					\
 	.write	 = simple_attr_write,					\
-	.llseek	 = generic_file_llseek,					\
+	.llseek	 = no_llseek,						\
 }
 
 static inline __printf(1, 2)
-- 
2.9.3

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

[PATCH] fs: set no_llseek in DEFINE_SIMPLE_ATTRIBUTE Geliang Tang <geliangtang@gmail.com> - 2017-05-06 17:40 +0200

csiph-web