From: "Josef 'Jeff' Sipek" VFS: Use SEEK_{SET,CUR,END} instead of hardcoded values Signed-off-by: Josef 'Jeff' Sipek Cc: Trond Myklebust Signed-off-by: Andrew Morton --- fs/locks.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff -puN fs/locks.c~vfs-use-seek_set-cur fs/locks.c --- a/fs/locks.c~vfs-use-seek_set-cur +++ a/fs/locks.c @@ -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: _