Skip to content

Commit

Permalink
[PATCH] VFS: Use SEEK_{SET, CUR, END} instead of hardcoded values
Browse files Browse the repository at this point in the history
VFS: Use SEEK_{SET,CUR,END} instead of hardcoded values

Signed-off-by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net>
Acked-by: Trond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
  • Loading branch information
Josef 'Jeff' Sipek authored and Linus Torvalds committed Oct 1, 2006
1 parent 4636d93 commit f5579f8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions fs/locks.c
Original file line number Diff line number Diff line change
Expand Up @@ -314,13 +314,13 @@ static int flock_to_posix_lock(struct file *filp, struct file_lock *fl,
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:
Expand Down Expand Up @@ -364,13 +364,13 @@ static int flock64_to_posix_lock(struct file *filp, struct file_lock *fl,
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:
Expand Down

0 comments on commit f5579f8

Please sign in to comment.