Skip to content

Commit 5f47c7e

Browse files
Al ViroLinus Torvalds
authored andcommitted
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>
1 parent c65c513 commit 5f47c7e

2 files changed

Lines changed: 14 additions & 14 deletions

File tree

‎fs/coda/dir.c‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -510,20 +510,20 @@ static int coda_venus_readdir(struct file *coda_file, void *buf,
510510
vdir = kmalloc(sizeof(*vdir), GFP_KERNEL);
511511
if (!vdir) return -ENOMEM;
512512

513-
switch (coda_file->f_pos) {
514-
case 0:
513+
if (coda_file->f_pos == 0) {
515514
ret = filldir(buf, ".", 1, 0, de->d_inode->i_ino, DT_DIR);
516-
if (ret < 0) break;
515+
if (ret < 0)
516+
goto out;
517517
result++;
518518
coda_file->f_pos++;
519-
/* fallthrough */
520-
case 1:
519+
}
520+
if (coda_file->f_pos == 1) {
521521
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;
523524
result++;
524525
coda_file->f_pos++;
525-
/* fallthrough */
526-
default:
526+
}
527527
while (1) {
528528
/* read entries from the directory file */
529529
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,
578578
* we've already established it is non-zero. */
579579
coda_file->f_pos += vdir->d_reclen;
580580
}
581-
}
581+
out:
582582
kfree(vdir);
583583
return result ? result : ret;
584584
}

‎fs/coda/upcall.c‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ int venus_statfs(struct dentry *dentry, struct kstatfs *sfs)
632632
/*
633633
* coda_upcall and coda_downcall routines.
634634
*/
635-
static void block_signals(sigset_t *old)
635+
static void coda_block_signals(sigset_t *old)
636636
{
637637
spin_lock_irq(&current->sighand->siglock);
638638
*old = current->blocked;
@@ -646,7 +646,7 @@ static void block_signals(sigset_t *old)
646646
spin_unlock_irq(&current->sighand->siglock);
647647
}
648648

649-
static void unblock_signals(sigset_t *old)
649+
static void coda_unblock_signals(sigset_t *old)
650650
{
651651
spin_lock_irq(&current->sighand->siglock);
652652
current->blocked = *old;
@@ -672,7 +672,7 @@ static inline void coda_waitfor_upcall(struct upc_req *req)
672672
sigset_t old;
673673
int blocked;
674674

675-
block_signals(&old);
675+
coda_block_signals(&old);
676676
blocked = 1;
677677

678678
add_wait_queue(&req->uc_sleep, &wait);
@@ -689,7 +689,7 @@ static inline void coda_waitfor_upcall(struct upc_req *req)
689689
if (blocked && time_after(jiffies, timeout) &&
690690
CODA_INTERRUPTIBLE(req))
691691
{
692-
unblock_signals(&old);
692+
coda_unblock_signals(&old);
693693
blocked = 0;
694694
}
695695

@@ -704,7 +704,7 @@ static inline void coda_waitfor_upcall(struct upc_req *req)
704704
schedule();
705705
}
706706
if (blocked)
707-
unblock_signals(&old);
707+
coda_unblock_signals(&old);
708708

709709
remove_wait_queue(&req->uc_sleep, &wait);
710710
set_current_state(TASK_RUNNING);

0 commit comments

Comments
 (0)