projects
/
platform
/
kernel
/
linux-rpi3.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
267378d
)
f2fs: return i_size if the hole is outside of i_size
author
Jaegeuk Kim
<jaegeuk.kim@samsung.com>
Mon, 28 Apr 2014 08:02:48 +0000
(17:02 +0900)
committer
Jaegeuk Kim
<jaegeuk.kim@samsung.com>
Wed, 7 May 2014 01:21:57 +0000
(10:21 +0900)
When SEEK_HOLE is requeted, it should return i_size if the hole position is
found outside of i_size.
Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
fs/f2fs/file.c
patch
|
blob
|
history
diff --git
a/fs/f2fs/file.c
b/fs/f2fs/file.c
index
d99d173
..
3112857
100644
(file)
--- a/
fs/f2fs/file.c
+++ b/
fs/f2fs/file.c
@@
-255,9
+255,9
@@
static loff_t f2fs_seek_block(struct file *file, loff_t offset, int whence)
if (whence == SEEK_DATA)
goto fail;
- else
- data_ofs = isize;
found:
+ if (whence == SEEK_HOLE && data_ofs > isize)
+ data_ofs = isize;
mutex_unlock(&inode->i_mutex);
return vfs_setpos(file, data_ofs, maxbytes);
fail: