From bd9b686ef4e5e181b496c8d9d880c6f6c5b3b2c2 Mon Sep 17 00:00:00 2001 From: Chris Snook Date: Tue, 8 May 2007 00:24:15 -0700 Subject: [PATCH] --- yaml --- r: 54547 b: refs/heads/master c: 1ae7075bcd805c3aa5e8f53effc63a4562d6110e h: refs/heads/master i: 54545: 4d7f14ae44a8f5b01bf67745d863ea49f950b228 54543: 38b8a2c64f8633ee633e5c5e015414ab452bfce9 v: v3 --- [refs] | 2 +- trunk/fs/read_write.c | 4 ++-- trunk/include/linux/fs.h | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index f5f278c45414..15b4792e6e40 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7b8e89249ba54fb6e12358bbed7e3070fa1d1e6a +refs/heads/master: 1ae7075bcd805c3aa5e8f53effc63a4562d6110e diff --git a/trunk/fs/read_write.c b/trunk/fs/read_write.c index 0642a1691d15..4d03008f015b 100644 --- a/trunk/fs/read_write.c +++ b/trunk/fs/read_write.c @@ -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) @@ -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, diff --git a/trunk/include/linux/fs.h b/trunk/include/linux/fs.h index 020a8426e10a..986b5d5d369f 100644 --- a/trunk/include/linux/fs.h +++ b/trunk/include/linux/fs.h @@ -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 {