* [PATCH] tmpfs: fix SEEK_DATA/SEEK_HOLE regression
@ 2013-08-04 18:30 Hugh Dickins
0 siblings, 0 replies; only message in thread
From: Hugh Dickins @ 2013-08-04 18:30 UTC (permalink / raw)
To: Linus Torvalds; +Cc: Jie Liu, Dave Chinner, Al Viro, linux-kernel
Commit 46a1c2c7ae53 ("vfs: export lseek_execute() to modules")
broke the tmpfs SEEK_DATA/SEEK_HOLE implementation, because
vfs_setpos() converts the carefully prepared -ENXIO to -EINVAL.
Other filesystems avoid it in error cases: do the same in tmpfs.
Signed-off-by: Hugh Dickins <hughd@google.com>
---
mm/shmem.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- 3.11-rc3/mm/shmem.c 2013-07-14 17:10:16.648003652 -0700
+++ linux/mm/shmem.c 2013-08-04 10:49:52.208372436 -0700
@@ -1798,7 +1798,8 @@ static loff_t shmem_file_llseek(struct f
}
}
- offset = vfs_setpos(file, offset, MAX_LFS_FILESIZE);
+ if (offset >= 0)
+ offset = vfs_setpos(file, offset, MAX_LFS_FILESIZE);
mutex_unlock(&inode->i_mutex);
return offset;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-08-04 18:30 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-04 18:30 [PATCH] tmpfs: fix SEEK_DATA/SEEK_HOLE regression Hugh Dickins
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®