diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-07-07 17:10:11 -0400 |
---|---|---|
committer | Arnd Bergmann <arnd@arndb.de> | 2010-10-15 09:53:46 -0400 |
commit | 776c163b1b93c8dfa5edba885bc2bfbc2d228a5f (patch) | |
tree | ef430b1ab7d7cb7a9fd16ffb6c1775e1325777e3 /fs | |
parent | ab91261f5c43f196ec7ff1d113847b87b7606b26 (diff) |
vfs: make no_llseek the default
All file operations now have an explicit .llseek
operation pointer, so we can change the default
action for future code.
This makes changes the default from default_llseek
to no_llseek, which always returns -ESPIPE if
a user tries to seek on a file without a .llseek
operation.
The name of the default_llseek function remains
unchanged, if anyone thinks we should change it,
please speak up.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org
Diffstat (limited to 'fs')
-rw-r--r-- | fs/read_write.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/read_write.c b/fs/read_write.c index fd09f6166ccf..e757ef26e4ce 100644 --- a/fs/read_write.c +++ b/fs/read_write.c | |||
@@ -156,7 +156,6 @@ loff_t vfs_llseek(struct file *file, loff_t offset, int origin) | |||
156 | 156 | ||
157 | fn = no_llseek; | 157 | fn = no_llseek; |
158 | if (file->f_mode & FMODE_LSEEK) { | 158 | if (file->f_mode & FMODE_LSEEK) { |
159 | fn = default_llseek; | ||
160 | if (file->f_op && file->f_op->llseek) | 159 | if (file->f_op && file->f_op->llseek) |
161 | fn = file->f_op->llseek; | 160 | fn = file->f_op->llseek; |
162 | } | 161 | } |