Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 269997
b: refs/heads/master
c: 9453615
h: refs/heads/master
i:
  269995: 29cd41f
v: v3
  • Loading branch information
Steven Whitehouse committed Oct 21, 2011
1 parent 2584afa commit 2a58275
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9a63edd12ba3c18351f00d6b77a6b2f49f2b8eb6
refs/heads/master: 9453615a1a7ef3fa910c6464a619595556cfcd63
13 changes: 11 additions & 2 deletions trunk/fs/gfs2/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,24 @@ static loff_t gfs2_llseek(struct file *file, loff_t offset, int origin)
struct gfs2_holder i_gh;
loff_t error;

if (origin == 2) {
switch (origin) {
case SEEK_END: /* These reference inode->i_size */
case SEEK_DATA:
case SEEK_HOLE:
error = gfs2_glock_nq_init(ip->i_gl, LM_ST_SHARED, LM_FLAG_ANY,
&i_gh);
if (!error) {
error = generic_file_llseek_unlocked(file, offset, origin);
gfs2_glock_dq_uninit(&i_gh);
}
} else
break;
case SEEK_CUR:
case SEEK_SET:
error = generic_file_llseek_unlocked(file, offset, origin);
break;
default:
error = -EINVAL;
}

return error;
}
Expand Down

0 comments on commit 2a58275

Please sign in to comment.