Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54547
b: refs/heads/master
c: 1ae7075
h: refs/heads/master
i:
  54545: 4d7f14a
  54543: 38b8a2c
v: v3
  • Loading branch information
Chris Snook authored and Linus Torvalds committed May 8, 2007
1 parent 16c6fa7 commit bd9b686
Show file tree
Hide file tree
Showing 3 changed files with 4 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: 7b8e89249ba54fb6e12358bbed7e3070fa1d1e6a
refs/heads/master: 1ae7075bcd805c3aa5e8f53effc63a4562d6110e
4 changes: 2 additions & 2 deletions trunk/fs/read_write.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ asmlinkage off_t sys_lseek(unsigned int fd, off_t offset, unsigned int origin)
goto bad;

retval = -EINVAL;
if (origin <= 2) {
if (origin <= SEEK_MAX) {
loff_t res = vfs_llseek(file, offset, origin);
retval = res;
if (res != (loff_t)retval)
Expand All @@ -166,7 +166,7 @@ asmlinkage long sys_llseek(unsigned int fd, unsigned long offset_high,
goto bad;

retval = -EINVAL;
if (origin > 2)
if (origin > SEEK_MAX)
goto out_putf;

offset = vfs_llseek(file, ((loff_t) offset_high << 32) | offset_low,
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
#define SEEK_SET 0 /* seek relative to beginning of file */
#define SEEK_CUR 1 /* seek relative to current file position */
#define SEEK_END 2 /* seek relative to end of file */
#define SEEK_MAX SEEK_END

/* And dynamically-tunable limits and defaults: */
struct files_stat_struct {
Expand Down

0 comments on commit bd9b686

Please sign in to comment.