aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/coda/dir.c18
-rw-r--r--fs/coda/upcall.c10
2 files changed, 14 insertions, 14 deletions
diff --git a/fs/coda/dir.c b/fs/coda/dir.c
index 04a3dd84c993..8e61236abf4a 100644
--- a/fs/coda/dir.c
+++ b/fs/coda/dir.c
@@ -510,20 +510,20 @@ static int coda_venus_readdir(struct file *coda_file, void *buf,
510 vdir = kmalloc(sizeof(*vdir), GFP_KERNEL); 510 vdir = kmalloc(sizeof(*vdir), GFP_KERNEL);
511 if (!vdir) return -ENOMEM; 511 if (!vdir) return -ENOMEM;
512 512
513 switch (coda_file->f_pos) { 513 if (coda_file->f_pos == 0) {
514 case 0:
515 ret = filldir(buf, ".", 1, 0, de->d_inode->i_ino, DT_DIR); 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 result++; 517 result++;
518 coda_file->f_pos++; 518 coda_file->f_pos++;
519 /* fallthrough */ 519 }
520 case 1: 520 if (coda_file->f_pos == 1) {
521 ret = filldir(buf, "..", 2, 1, de->d_parent->d_inode->i_ino, DT_DIR); 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 result++; 524 result++;
524 coda_file->f_pos++; 525 coda_file->f_pos++;
525 /* fallthrough */ 526 }
526 default:
527 while (1) { 527 while (1) {
528 /* read entries from the directory file */ 528 /* read entries from the directory file */
529 ret = kernel_read(host_file, coda_file->f_pos - 2, (char *)vdir, 529 ret = kernel_read(host_file, coda_file->f_pos - 2, (char *)vdir,
@@ -578,7 +578,7 @@ static int coda_venus_readdir(struct file *coda_file, void *buf,
578 * we've already established it is non-zero. */ 578 * we've already established it is non-zero. */
579 coda_file->f_pos += vdir->d_reclen; 579 coda_file->f_pos += vdir->d_reclen;
580 } 580 }
581 } 581out:
582 kfree(vdir); 582 kfree(vdir);
583 return result ? result : ret; 583 return result ? result : ret;
584} 584}
diff --git a/fs/coda/upcall.c b/fs/coda/upcall.c
index e4e766e5557c..cd561d2e90b0 100644
--- a/fs/coda/upcall.c
+++ b/fs/coda/upcall.c
@@ -632,7 +632,7 @@ int venus_statfs(struct dentry *dentry, struct kstatfs *sfs)
632/* 632/*
633 * coda_upcall and coda_downcall routines. 633 * coda_upcall and coda_downcall routines.
634 */ 634 */
635static void block_signals(sigset_t *old) 635static void coda_block_signals(sigset_t *old)
636{ 636{
637 spin_lock_irq(&current->sighand->siglock); 637 spin_lock_irq(&current->sighand->siglock);
638 *old = current->blocked; 638 *old = current->blocked;
@@ -646,7 +646,7 @@ static void block_signals(sigset_t *old)
646 spin_unlock_irq(&current->sighand->siglock); 646 spin_unlock_irq(&current->sighand->siglock);
647} 647}
648 648
649static void unblock_signals(sigset_t *old) 649static void coda_unblock_signals(sigset_t *old)
650{ 650{
651 spin_lock_irq(&current->sighand->siglock); 651 spin_lock_irq(&current->sighand->siglock);
652 current->blocked = *old; 652 current->blocked = *old;
@@ -672,7 +672,7 @@ static inline void coda_waitfor_upcall(struct upc_req *req)
672 sigset_t old; 672 sigset_t old;
673 int blocked; 673 int blocked;
674 674
675 block_signals(&old); 675 coda_block_signals(&old);
676 blocked = 1; 676 blocked = 1;
677 677
678 add_wait_queue(&req->uc_sleep, &wait); 678 add_wait_queue(&req->uc_sleep, &wait);
@@ -689,7 +689,7 @@ static inline void coda_waitfor_upcall(struct upc_req *req)
689 if (blocked && time_after(jiffies, timeout) && 689 if (blocked && time_after(jiffies, timeout) &&
690 CODA_INTERRUPTIBLE(req)) 690 CODA_INTERRUPTIBLE(req))
691 { 691 {
692 unblock_signals(&old); 692 coda_unblock_signals(&old);
693 blocked = 0; 693 blocked = 0;
694 } 694 }
695 695
@@ -704,7 +704,7 @@ static inline void coda_waitfor_upcall(struct upc_req *req)
704 schedule(); 704 schedule();
705 } 705 }
706 if (blocked) 706 if (blocked)
707 unblock_signals(&old); 707 coda_unblock_signals(&old);
708 708
709 remove_wait_queue(&req->uc_sleep, &wait); 709 remove_wait_queue(&req->uc_sleep, &wait);
710 set_current_state(TASK_RUNNING); 710 set_current_state(TASK_RUNNING);