coda breakage

a) switch by loff_t == __cmpdi2 use. Replaced with a couple
of obvious ifs; update of ->f_pos in the first one makes sure that we
do the right thing in all cases.
b) block_signals() and unblock_signals() are globals on UML.
Renamed coda ones; in principle UML probably ought to do rename as
well, but that's another story.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by Al Viro and committed by Linus Torvalds 5f47c7ea c65c5131

+14 -14
+9 -9
fs/coda/dir.c
··· 510 510 vdir = kmalloc(sizeof(*vdir), GFP_KERNEL); 511 511 if (!vdir) return -ENOMEM; 512 512 513 - switch (coda_file->f_pos) { 514 - case 0: 513 + if (coda_file->f_pos == 0) { 515 514 ret = filldir(buf, ".", 1, 0, de->d_inode->i_ino, DT_DIR); 516 - if (ret < 0) break; 515 + if (ret < 0) 516 + goto out; 517 517 result++; 518 518 coda_file->f_pos++; 519 - /* fallthrough */ 520 - case 1: 519 + } 520 + if (coda_file->f_pos == 1) { 521 521 ret = filldir(buf, "..", 2, 1, de->d_parent->d_inode->i_ino, DT_DIR); 522 - if (ret < 0) break; 522 + if (ret < 0) 523 + goto out; 523 524 result++; 524 525 coda_file->f_pos++; 525 - /* fallthrough */ 526 - default: 526 + } 527 527 while (1) { 528 528 /* read entries from the directory file */ 529 529 ret = kernel_read(host_file, coda_file->f_pos - 2, (char *)vdir, ··· 578 578 * we've already established it is non-zero. */ 579 579 coda_file->f_pos += vdir->d_reclen; 580 580 } 581 - } 581 + out: 582 582 kfree(vdir); 583 583 return result ? result : ret; 584 584 }
+5 -5
fs/coda/upcall.c
··· 632 632 /* 633 633 * coda_upcall and coda_downcall routines. 634 634 */ 635 - static void block_signals(sigset_t *old) 635 + static void coda_block_signals(sigset_t *old) 636 636 { 637 637 spin_lock_irq(&current->sighand->siglock); 638 638 *old = current->blocked; ··· 646 646 spin_unlock_irq(&current->sighand->siglock); 647 647 } 648 648 649 - static void unblock_signals(sigset_t *old) 649 + static void coda_unblock_signals(sigset_t *old) 650 650 { 651 651 spin_lock_irq(&current->sighand->siglock); 652 652 current->blocked = *old; ··· 672 672 sigset_t old; 673 673 int blocked; 674 674 675 - block_signals(&old); 675 + coda_block_signals(&old); 676 676 blocked = 1; 677 677 678 678 add_wait_queue(&req->uc_sleep, &wait); ··· 689 689 if (blocked && time_after(jiffies, timeout) && 690 690 CODA_INTERRUPTIBLE(req)) 691 691 { 692 - unblock_signals(&old); 692 + coda_unblock_signals(&old); 693 693 blocked = 0; 694 694 } 695 695 ··· 704 704 schedule(); 705 705 } 706 706 if (blocked) 707 - unblock_signals(&old); 707 + coda_unblock_signals(&old); 708 708 709 709 remove_wait_queue(&req->uc_sleep, &wait); 710 710 set_current_state(TASK_RUNNING);