aboutsummaryrefslogtreecommitdiffstats
path: root/fs/locks.c
diff options
context:
space:
mode:
authorJosef 'Jeff' Sipek <jeffpc@josefsipek.net>2006-10-01 02:27:35 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-10-01 03:39:21 -0400
commitf5579f8c7d7e2c9eb62b566c511b21091a778157 (patch)
tree76d3df1e8e3865bc3867f3934df081933d1e9ee6 /fs/locks.c
parent4636d93b461779cd95156cc5f5d53690a5d6a07b (diff)
[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 'fs/locks.c')
-rw-r--r--fs/locks.c12
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,
314 off_t start, end; 314 off_t start, end;
315 315
316 switch (l->l_whence) { 316 switch (l->l_whence) {
317 case 0: /*SEEK_SET*/ 317 case SEEK_SET:
318 start = 0; 318 start = 0;
319 break; 319 break;
320 case 1: /*SEEK_CUR*/ 320 case SEEK_CUR:
321 start = filp->f_pos; 321 start = filp->f_pos;
322 break; 322 break;
323 case 2: /*SEEK_END*/ 323 case SEEK_END:
324 start = i_size_read(filp->f_dentry->d_inode); 324 start = i_size_read(filp->f_dentry->d_inode);
325 break; 325 break;
326 default: 326 default:
@@ -364,13 +364,13 @@ static int flock64_to_posix_lock(struct file *filp, struct file_lock *fl,
364 loff_t start; 364 loff_t start;
365 365
366 switch (l->l_whence) { 366 switch (l->l_whence) {
367 case 0: /*SEEK_SET*/ 367 case SEEK_SET:
368 start = 0; 368 start = 0;
369 break; 369 break;
370 case 1: /*SEEK_CUR*/ 370 case SEEK_CUR:
371 start = filp->f_pos; 371 start = filp->f_pos;
372 break; 372 break;
373 case 2: /*SEEK_END*/ 373 case SEEK_END:
374 start = i_size_read(filp->f_dentry->d_inode); 374 start = i_size_read(filp->f_dentry->d_inode);
375 break; 375 break;
376 default: 376 default: