Skip to content

Commit 776c163

Browse files
committed
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
1 parent ab91261 commit 776c163

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

‎fs/read_write.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ loff_t vfs_llseek(struct file *file, loff_t offset, int origin)
156156

157157
fn = no_llseek;
158158
if (file->f_mode & FMODE_LSEEK) {
159-
fn = default_llseek;
160159
if (file->f_op && file->f_op->llseek)
161160
fn = file->f_op->llseek;
162161
}

0 commit comments

Comments
 (0)