projects
/
GitHub
/
MotorolaMobilityLLC
/
kernel-slsi.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
47f4396
)
Squashfs: fix f_pos check in get_dir_index_using_offset
author
Phillip Lougher
<phillip@squashfs.org.uk>
Fri, 9 Mar 2012 02:27:49 +0000
(
02:27
+0000)
committer
Phillip Lougher
<phillip@squashfs.org.uk>
Sat, 10 Mar 2012 03:01:02 +0000
(
03:01
+0000)
One off error in the f_pos check. If f_pos is 3 or less don't
bother reading the index because we're at the start of the
directory, and we obviously already know where that is on disk.
This eliminates an unnecessary read.
Signed-off-by: Phillip Lougher <phillip@squashfs.org.uk>
fs/squashfs/dir.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/squashfs/dir.c
b/fs/squashfs/dir.c
index 7142a6fd28d392dddbf8b135d3acf15c3f4e628b..b381305c9a47263ca34750b4e67172780047b9ca 100644
(file)
--- a/
fs/squashfs/dir.c
+++ b/
fs/squashfs/dir.c
@@
-64,7
+64,7
@@
static int get_dir_index_using_offset(struct super_block *sb,
* is offset by 3 because we invent "." and ".." entries which are
* not actually stored in the directory.
*/
- if (f_pos < 3)
+ if (f_pos <
=
3)
return f_pos;
f_pos -= 3;