Commit f5579f8c authored by Josef 'Jeff' Sipek's avatar Josef 'Jeff' Sipek Committed by Linus Torvalds

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

VFS: Use SEEK_{SET,CUR,END} instead of hardcoded values
Signed-off-by: default avatarJosef 'Jeff' Sipek <jeffpc@josefsipek.net>
Acked-by: default avatarTrond Myklebust <trond.myklebust@fys.uio.no>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 4636d93b
...@@ -314,13 +314,13 @@ static int flock_to_posix_lock(struct file *filp, struct file_lock *fl, ...@@ -314,13 +314,13 @@ static int flock_to_posix_lock(struct file *filp, struct file_lock *fl,
off_t start, end; off_t start, end;
switch (l->l_whence) { switch (l->l_whence) {
case 0: /*SEEK_SET*/ case SEEK_SET:
start = 0; start = 0;
break; break;
case 1: /*SEEK_CUR*/ case SEEK_CUR:
start = filp->f_pos; start = filp->f_pos;
break; break;
case 2: /*SEEK_END*/ case SEEK_END:
start = i_size_read(filp->f_dentry->d_inode); start = i_size_read(filp->f_dentry->d_inode);
break; break;
default: default:
...@@ -364,13 +364,13 @@ static int flock64_to_posix_lock(struct file *filp, struct file_lock *fl, ...@@ -364,13 +364,13 @@ static int flock64_to_posix_lock(struct file *filp, struct file_lock *fl,
loff_t start; loff_t start;
switch (l->l_whence) { switch (l->l_whence) {
case 0: /*SEEK_SET*/ case SEEK_SET:
start = 0; start = 0;
break; break;
case 1: /*SEEK_CUR*/ case SEEK_CUR:
start = filp->f_pos; start = filp->f_pos;
break; break;
case 2: /*SEEK_END*/ case SEEK_END:
start = i_size_read(filp->f_dentry->d_inode); start = i_size_read(filp->f_dentry->d_inode);
break; break;
default: default:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment