diff options
author | Josef 'Jeff' Sipek <jeffpc@josefsipek.net> | 2006-10-01 08:27:35 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-01 09:39:21 +0200 |
commit | f5579f8c7d7e2c9eb62b566c511b21091a778157 (patch) | |
tree | 76d3df1e8e3865bc3867f3934df081933d1e9ee6 /fs/locks.c | |
parent | [PATCH] EICON ISDN: Removed unused definitions for OS_SEEK_* (diff) | |
download | linux-f5579f8c7d7e2c9eb62b566c511b21091a778157.tar.xz linux-f5579f8c7d7e2c9eb62b566c511b21091a778157.zip |
[PATCH] VFS: Use SEEK_{SET, CUR, END} instead of hardcoded values
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>
Diffstat (limited to '')
-rw-r--r-- | fs/locks.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/locks.c b/fs/locks.c index d7c53392cac1..21dfadfca2bc 100644 --- a/fs/locks.c +++ b/fs/locks.c @@ -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: @@ -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: |