[PATCH 7 of 11] VFS: Use SEEK_{SET, CUR,END} instead of hardcoded values

From: Josef 'Jeff' Sipek
Date: Sat Sep 16 2006 - 21:52:06 EST


VFS: Use SEEK_{SET,CUR,END} instead of hardcoded values

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@xxxxxxxxxxxxxx>

--

diff -r ca33dbd739b3 -r 1622a39ffb54 fs/locks.c
--- a/fs/locks.c Sat Sep 16 21:00:45 2006 -0400
+++ b/fs/locks.c Sat Sep 16 21:00:45 2006 -0400
@@ -314,13 +314,13 @@ static int flock_to_posix_lock(struct fi
off_t start, end;

switch (l->l_whence) {
- case 0: /*SEEK_SET*/
+ case SEEK_SET:
start = 0;
break;
- case 1: /*SEEK_CUR*/
+ case SEEK_CUR:
start = filp->f_pos;
break;
- case 2: /*SEEK_END*/
+ case SEEK_END:
start = i_size_read(filp->f_dentry->d_inode);
break;
default:
@@ -364,13 +364,13 @@ static int flock64_to_posix_lock(struct
loff_t start;

switch (l->l_whence) {
- case 0: /*SEEK_SET*/
+ case SEEK_SET:
start = 0;
break;
- case 1: /*SEEK_CUR*/
+ case SEEK_CUR:
start = filp->f_pos;
break;
- case 2: /*SEEK_END*/
+ case SEEK_END:
start = i_size_read(filp->f_dentry->d_inode);
break;
default:


-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/