## Automatically generated incremental diff ## From: linux-2.5.2-pre1 ## To: linux-2.5.2-pre2 ## Robot: $Id: make-incremental-diff,v 1.9 2001/12/10 00:06:56 hpa Exp $ diff -urN linux-2.5.2-pre1/Makefile linux/Makefile --- linux-2.5.2-pre1/Makefile Tue Dec 25 16:50:11 2001 +++ linux/Makefile Tue Dec 25 16:50:13 2001 @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 5 SUBLEVEL = 2 -EXTRAVERSION =-pre1 +EXTRAVERSION =-pre2 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) diff -urN linux-2.5.2-pre1/arch/alpha/kernel/setup.c linux/arch/alpha/kernel/setup.c --- linux-2.5.2-pre1/arch/alpha/kernel/setup.c Fri Nov 16 18:38:39 2001 +++ linux/arch/alpha/kernel/setup.c Tue Dec 25 16:50:13 2001 @@ -440,12 +440,6 @@ return MKDEV(TTY_MAJOR, 64 + c->index); } -static int srm_console_wait_key(struct console *co) -{ - /* Huh? */ - return 1; -} - static int __init srm_console_setup(struct console *co, char *options) { return 1; @@ -455,7 +449,6 @@ name: "srm0", write: srm_console_write, device: srm_console_device, - wait_key: srm_console_wait_key, setup: srm_console_setup, flags: CON_PRINTBUFFER | CON_ENABLED, /* fake it out */ index: -1, diff -urN linux-2.5.2-pre1/arch/ia64/hp/hpsim_console.c linux/arch/ia64/hp/hpsim_console.c --- linux-2.5.2-pre1/arch/ia64/hp/hpsim_console.c Thu Oct 12 14:20:48 2000 +++ linux/arch/ia64/hp/hpsim_console.c Tue Dec 25 16:50:13 2001 @@ -24,14 +24,12 @@ static int simcons_init (struct console *, char *); static void simcons_write (struct console *, const char *, unsigned); -static int simcons_wait_key (struct console *); static kdev_t simcons_console_device (struct console *); struct console hpsim_cons = { name: "simcons", write: simcons_write, device: simcons_console_device, - wait_key: simcons_wait_key, setup: simcons_init, flags: CON_PRINTBUFFER, index: -1, @@ -54,17 +52,6 @@ if (ch == '\n') ia64_ssc('\r', 0, 0, 0, SSC_PUTCHAR); } -} - -static int -simcons_wait_key (struct console *cons) -{ - char ch; - - do { - ch = ia64_ssc(0, 0, 0, 0, SSC_GETCHAR); - } while (ch == '\0'); - return ch; } static kdev_t diff -urN linux-2.5.2-pre1/arch/m68k/amiga/config.c linux/arch/m68k/amiga/config.c --- linux-2.5.2-pre1/arch/m68k/amiga/config.c Wed Nov 28 13:22:25 2001 +++ linux/arch/m68k/amiga/config.c Tue Dec 25 16:50:13 2001 @@ -98,7 +98,6 @@ extern void amiga_floppy_setup(char *, int *); #endif static void amiga_reset (void); -static int amiga_wait_key (struct console *co); extern void amiga_init_sound(void); static void amiga_savekmsg_init(void); static void amiga_mem_console_write(struct console *co, const char *b, @@ -112,7 +111,6 @@ static struct console amiga_console_driver = { name: "debug", - wait_key: amiga_wait_key, flags: CON_PRINTBUFFER, index: -1, }; @@ -740,33 +738,6 @@ } return 0; -} - -static int amiga_wait_key (struct console *co) -{ - int i; - - while (1) { - while (ciaa.pra & 0x40); - - /* debounce */ - for (i = 0; i < 1000; i++); - - if (!(ciaa.pra & 0x40)) - break; - } - - /* wait for button up */ - while (1) { - while (!(ciaa.pra & 0x40)); - - /* debounce */ - for (i = 0; i < 1000; i++); - - if (ciaa.pra & 0x40) - break; - } - return 0; } static NORET_TYPE void amiga_reset( void ) diff -urN linux-2.5.2-pre1/arch/m68k/mac/debug.c linux/arch/m68k/mac/debug.c --- linux-2.5.2-pre1/arch/m68k/mac/debug.c Mon Jun 11 19:15:27 2001 +++ linux/arch/m68k/mac/debug.c Tue Dec 25 16:50:13 2001 @@ -248,17 +248,6 @@ return( scc.cha_b_data ); } -int mac_scca_console_wait_key(struct console *co) -{ - int i; - do { - for( i = uSEC; i > 0; --i ) - barrier(); - } while( !(scc.cha_a_ctrl & 0x01) ); /* wait for rx buf filled */ - for( i = uSEC; i > 0; --i ) - barrier(); - return( scc.cha_a_data ); -} #endif /* The following two functions do a quick'n'dirty initialization of the MFP or @@ -395,9 +384,6 @@ /* Mac modem port */ mac_init_scc_port( B9600|CS8, 0 ); mac_console_driver.write = mac_scca_console_write; -#ifdef CONFIG_SERIAL_CONSOLE - mac_console_driver.wait_key = mac_scca_console_wait_key; -#endif scc_port = 0; } else if (!strcmp( m68k_debug_device, "ser2" )) { diff -urN linux-2.5.2-pre1/arch/m68k/mvme147/config.c linux/arch/m68k/mvme147/config.c --- linux-2.5.2-pre1/arch/m68k/mvme147/config.c Wed Nov 28 13:22:25 2001 +++ linux/arch/m68k/mvme147/config.c Tue Dec 25 16:50:13 2001 @@ -241,31 +241,7 @@ restore_flags(flags); } - -static int m147_scc_wait_key (struct console *co) -{ - volatile unsigned char *p = (volatile char *)M147_SCC_A_ADDR; - unsigned long flags; - int c; - - /* wait for rx buf filled */ - while ((*p & 0x01) == 0) - ; - - save_flags(flags); - cli(); - - *p = 8; - scc_delay(); - c = *p; - - restore_flags(flags); - return c; -} - - void mvme147_init_console_port (struct console *co, int cflag) { co->write = m147_scc_write; - co->wait_key = m147_scc_wait_key; } diff -urN linux-2.5.2-pre1/arch/m68k/q40/config.c linux/arch/m68k/q40/config.c --- linux-2.5.2-pre1/arch/m68k/q40/config.c Sun Dec 16 12:23:05 2001 +++ linux/arch/m68k/q40/config.c Tue Dec 25 16:50:13 2001 @@ -72,10 +72,8 @@ extern int ql_ticks; -static int q40_wait_key(struct console *co){return 0;} static struct console q40_console_driver = { name: "debug", - wait_key: q40_wait_key, flags: CON_PRINTBUFFER, index: -1, }; diff -urN linux-2.5.2-pre1/arch/m68k/sun3x/prom.c linux/arch/m68k/sun3x/prom.c --- linux-2.5.2-pre1/arch/m68k/sun3x/prom.c Mon Jun 11 19:15:27 2001 +++ linux/arch/m68k/sun3x/prom.c Tue Dec 25 16:50:13 2001 @@ -96,7 +96,6 @@ sun3x_prom_write, /* write */ NULL, /* read */ NULL, /* device */ - NULL, /* wait_key */ NULL, /* unblank */ NULL, /* setup */ CON_PRINTBUFFER, diff -urN linux-2.5.2-pre1/arch/mips/au1000/common/serial.c linux/arch/mips/au1000/common/serial.c --- linux-2.5.2-pre1/arch/mips/au1000/common/serial.c Fri Oct 5 12:06:51 2001 +++ linux/arch/mips/au1000/common/serial.c Tue Dec 25 16:50:13 2001 @@ -2922,35 +2922,6 @@ serial_out(info, UART_IER, ier); } -/* - * Receive character from the serial port - */ -static int serial_console_wait_key(struct console *co) -{ - static struct async_struct *info; - int ier, c; - - info = &async_sercons; - - /* - * First save the IER then disable the interrupts so - * that the real driver for the port does not get the - * character. - */ - ier = serial_in(info, UART_IER); - serial_out(info, UART_IER, 0x00); - - while ((serial_in(info, UART_LSR) & UART_LSR_DR) == 0); - c = serial_in(info, UART_RX); - - /* - * Restore the interrupts - */ - serial_out(info, UART_IER, ier); - - return c; -} - static kdev_t serial_console_device(struct console *c) { return MKDEV(TTY_MAJOR, 64 + c->index); @@ -3075,7 +3046,6 @@ name: "ttyS", write: serial_console_write, device: serial_console_device, - wait_key: serial_console_wait_key, setup: serial_console_setup, flags: CON_PRINTBUFFER, index: -1, diff -urN linux-2.5.2-pre1/arch/mips/baget/vacserial.c linux/arch/mips/baget/vacserial.c --- linux-2.5.2-pre1/arch/mips/baget/vacserial.c Sun Sep 9 10:43:01 2001 +++ linux/arch/mips/baget/vacserial.c Tue Dec 25 16:50:13 2001 @@ -2622,43 +2622,6 @@ serial_outp(&scr_info, VAC_UART_INT_MASK, ier); } -/* - * Receive character from the serial port - */ -static int serial_console_wait_key(struct console *co) -{ - struct serial_state *ser; - int ier; - int lsr; - int c; - struct async_struct scr_info; /* serial_{in,out} because HUB6 */ - - ser = rs_table + co->index; - scr_info.magic = SERIAL_MAGIC; - scr_info.port = ser->port; - scr_info.flags = ser->flags; - - /* - * First save the IER then disable the interrupts so - * that the real driver for the port does not get the - * character. - */ - ier = serial_inp(&scr_info, VAC_UART_INT_MASK); - serial_outp(&scr_info, VAC_UART_INT_MASK, 0x00); - - do { - lsr = serial_inp(&scr_info, VAC_UART_INT_STATUS); - } while (!(lsr & VAC_UART_STATUS_RX_READY)); - c = serial_inp(&scr_info, VAC_UART_RX); - - /* - * Restore the interrupts - */ - serial_outp(&scr_info, VAC_UART_INT_MASK, ier); - - return c; -} - static kdev_t serial_console_device(struct console *c) { return MKDEV(TTY_MAJOR, 64 + c->index); @@ -2812,7 +2775,6 @@ name: "ttyS", write: serial_console_write, device: serial_console_device, - wait_key: serial_console_wait_key, setup: serial_console_setup, flags: CON_PRINTBUFFER, index: -1, diff -urN linux-2.5.2-pre1/arch/mips/dec/promcon.c linux/arch/mips/dec/promcon.c --- linux-2.5.2-pre1/arch/mips/dec/promcon.c Thu Oct 12 14:20:48 2000 +++ linux/arch/mips/dec/promcon.c Tue Dec 25 16:50:13 2001 @@ -30,11 +30,6 @@ } } -static int prom_console_wait_key(struct console *co) -{ - return prom_getchar(); -} - static int __init prom_console_setup(struct console *co, char *options) { return 0; @@ -50,7 +45,6 @@ name: "ttyS", write: prom_console_write, device: prom_console_device, - wait_key: prom_console_wait_key, setup: prom_console_setup, flags: CON_PRINTBUFFER, index: -1, diff -urN linux-2.5.2-pre1/arch/parisc/kernel/pdc_cons.c linux/arch/parisc/kernel/pdc_cons.c --- linux-2.5.2-pre1/arch/parisc/kernel/pdc_cons.c Sun Sep 16 21:23:15 2001 +++ linux/arch/parisc/kernel/pdc_cons.c Tue Dec 25 16:50:13 2001 @@ -105,10 +105,6 @@ static struct console pdc_cons = { name: "ttyB", write: pdc_console_write, - read: NULL, - device: NULL, - wait_key: pdc_console_wait_key, - unblank: NULL, setup: pdc_console_setup, flags: CON_PRINTBUFFER|CON_ENABLED, // |CON_CONSDEV, index: -1, diff -urN linux-2.5.2-pre1/arch/ppc/8260_io/uart.c linux/arch/ppc/8260_io/uart.c --- linux-2.5.2-pre1/arch/ppc/8260_io/uart.c Mon May 21 17:04:46 2001 +++ linux/arch/ppc/8260_io/uart.c Tue Dec 25 16:50:13 2001 @@ -2216,54 +2216,6 @@ info->tx_cur = (cbd_t *)bdp; } -/* - * Receive character from the serial port. This only works well - * before the port is initialize for real use. - */ -static int serial_console_wait_key(struct console *co) -{ - struct serial_state *ser; - u_char c, *cp; - ser_info_t *info; - volatile cbd_t *bdp; - volatile smc_uart_t *up; - - ser = rs_table + co->index; - - /* Pointer to UART in parameter ram. - */ - up = (smc_uart_t *)&immr->im_dprambase[ser->port]; - - /* Get the address of the host memory buffer. - * If the port has been initialized for general use, we must - * use information from the port structure. - */ - if ((info = (ser_info_t *)ser->info)) - bdp = info->rx_cur; - else - bdp = (cbd_t *)&immr->im_dprambase[up->smc_rbase]; - - /* - * We need to gracefully shut down the receiver, disable - * interrupts, then read the input. - */ - while (bdp->cbd_sc & BD_SC_EMPTY); /* Wait for a character */ - cp = __va(bdp->cbd_bufaddr); - - if (info) { - if (bdp->cbd_sc & BD_SC_WRAP) { - bdp = info->rx_bd_base; - } - else { - bdp++; - } - info->rx_cur = (cbd_t *)bdp; - } - - c = *cp; - return((int)c); -} - static kdev_t serial_console_device(struct console *c) { return MKDEV(TTYAUX_MAJOR, 64 + c->index); @@ -2274,7 +2226,6 @@ name: "ttyS", write: serial_console_write, device: serial_console_device, - wait_key: serial_console_wait_key, setup: serial_console_setup, flags: CON_PRINTBUFFER, index: CONFIG_SERIAL_CONSOLE_PORT, diff -urN linux-2.5.2-pre1/arch/ppc/8xx_io/uart.c linux/arch/ppc/8xx_io/uart.c --- linux-2.5.2-pre1/arch/ppc/8xx_io/uart.c Fri Nov 2 17:43:54 2001 +++ linux/arch/ppc/8xx_io/uart.c Tue Dec 25 16:50:13 2001 @@ -97,7 +97,6 @@ static void serial_console_write(struct console *c, const char *s, unsigned count); static kdev_t serial_console_device(struct console *c); -static int serial_console_wait_key(struct console *co); #if defined(CONFIG_SERIAL_CONSOLE) && defined(CONFIG_MAGIC_SYSRQ) static unsigned long break_pressed; /* break, really ... */ @@ -218,7 +217,6 @@ name: "ttyS", write: serial_console_write, device: serial_console_device, - wait_key: serial_console_wait_key, setup: serial_console_setup, flags: CON_PRINTBUFFER, index: CONFIG_SERIAL_CONSOLE_PORT, @@ -2400,11 +2398,6 @@ } return((int)c); -} - -static int serial_console_wait_key(struct console *co) -{ - return(my_console_wait_key(co->index, 0, NULL)); } #ifdef CONFIG_XMON diff -urN linux-2.5.2-pre1/arch/ppc/amiga/config.c linux/arch/ppc/amiga/config.c --- linux-2.5.2-pre1/arch/ppc/amiga/config.c Wed Nov 28 13:22:26 2001 +++ linux/arch/ppc/amiga/config.c Tue Dec 25 16:50:13 2001 @@ -104,7 +104,6 @@ extern void amiga_floppy_setup(char *, int *); #endif static void amiga_reset (void); -static int amiga_wait_key (struct console *co); extern void amiga_init_sound(void); static void amiga_savekmsg_init(void); static void amiga_mem_console_write(struct console *co, const char *b, @@ -118,7 +117,6 @@ static struct console amiga_console_driver = { name: "debug", - wait_key: amiga_wait_key, flags: CON_PRINTBUFFER, index: -1, }; @@ -734,33 +732,6 @@ } return 0; -} - -static int amiga_wait_key (struct console *co) -{ - int i; - - while (1) { - while (ciaa.pra & 0x40); - - /* debounce */ - for (i = 0; i < 1000; i++); - - if (!(ciaa.pra & 0x40)) - break; - } - - /* wait for button up */ - while (1) { - while (!(ciaa.pra & 0x40)); - - /* debounce */ - for (i = 0; i < 1000; i++); - - if (ciaa.pra & 0x40) - break; - } - return 0; } static NORET_TYPE void amiga_reset( void ) diff -urN linux-2.5.2-pre1/arch/sh/kernel/setup.c linux/arch/sh/kernel/setup.c --- linux-2.5.2-pre1/arch/sh/kernel/setup.c Fri Nov 16 18:38:39 2001 +++ linux/arch/sh/kernel/setup.c Tue Dec 25 16:50:13 2001 @@ -140,15 +140,6 @@ sh_bios_console_write(s, count); } -/* - * Receive character from the serial port - */ -static int sh_console_wait_key(struct console *co) -{ - /* Not implemented yet */ - return 0; -} - static kdev_t sh_console_device(struct console *c) { /* TODO: this is totally bogus */ @@ -183,7 +174,6 @@ name: "bios", write: sh_console_write, device: sh_console_device, - wait_key: sh_console_wait_key, setup: sh_console_setup, flags: CON_PRINTBUFFER, index: -1, diff -urN linux-2.5.2-pre1/drivers/char/console.c linux/drivers/char/console.c --- linux-2.5.2-pre1/drivers/char/console.c Mon Oct 15 14:00:43 2001 +++ linux/drivers/char/console.c Tue Dec 25 16:50:13 2001 @@ -2178,7 +2178,6 @@ name: "tty", write: vt_console_print, device: vt_console_device, - wait_key: keyboard_wait_for_keypress, unblank: unblank_screen, flags: CON_PRINTBUFFER, index: -1, diff -urN linux-2.5.2-pre1/drivers/char/dz.c linux/drivers/char/dz.c --- linux-2.5.2-pre1/drivers/char/dz.c Sun Sep 9 10:43:02 2001 +++ linux/drivers/char/dz.c Tue Dec 25 16:50:13 2001 @@ -75,7 +75,6 @@ DECLARE_TASK_QUEUE(tq_serial); -extern wait_queue_head_t keypress_wait; static struct dz_serial *lines[4]; static unsigned char tmp_buffer[256]; @@ -228,8 +227,6 @@ if (info->is_console) { if (ch == 0) return; /* it's a break ... */ - - wake_up (&keypress_wait); /* It is a 'keyboard interrupt' ;-) */ } #endif @@ -1509,11 +1506,6 @@ } } -static int dz_console_wait_key(struct console *co) -{ - return 0; -} - static kdev_t dz_console_device(struct console *c) { return MKDEV(TTY_MAJOR, 64 + c->index); @@ -1614,7 +1606,6 @@ name: "ttyS", write: dz_console_print, device: dz_console_device, - wait_key: dz_console_wait_key, setup: dz_console_setup, flags: CON_CONSDEV | CON_PRINTBUFFER, index: CONSOLE_LINE, diff -urN linux-2.5.2-pre1/drivers/char/keyboard.c linux/drivers/char/keyboard.c --- linux-2.5.2-pre1/drivers/char/keyboard.c Tue Sep 18 13:39:51 2001 +++ linux/drivers/char/keyboard.c Tue Dec 25 16:50:13 2001 @@ -67,15 +67,8 @@ extern void ctrl_alt_del(void); -DECLARE_WAIT_QUEUE_HEAD(keypress_wait); struct console; -int keyboard_wait_for_keypress(struct console *co) -{ - sleep_on(&keypress_wait); - return 0; -} - /* * global state includes the following, and various static variables * in this module: prev_scancode, shift_state, diacr, npadch, dead_key_next. @@ -334,7 +327,6 @@ void put_queue(int ch) { - wake_up(&keypress_wait); if (tty) { tty_insert_flip_char(tty, ch, 0); con_schedule_flip(tty); @@ -343,7 +335,6 @@ static void puts_queue(char *cp) { - wake_up(&keypress_wait); if (!tty) return; diff -urN linux-2.5.2-pre1/drivers/char/serial.c linux/drivers/char/serial.c --- linux-2.5.2-pre1/drivers/char/serial.c Sun Nov 25 09:43:42 2001 +++ linux/drivers/char/serial.c Tue Dec 25 16:50:13 2001 @@ -5825,35 +5825,6 @@ serial_out(info, UART_IER, ier); } -/* - * Receive character from the serial port - */ -static int serial_console_wait_key(struct console *co) -{ - static struct async_struct *info; - int ier, c; - - info = &async_sercons; - - /* - * First save the IER then disable the interrupts so - * that the real driver for the port does not get the - * character. - */ - ier = serial_in(info, UART_IER); - serial_out(info, UART_IER, 0x00); - - while ((serial_in(info, UART_LSR) & UART_LSR_DR) == 0); - c = serial_in(info, UART_RX); - - /* - * Restore the interrupts - */ - serial_out(info, UART_IER, ier); - - return c; -} - static kdev_t serial_console_device(struct console *c) { return MKDEV(TTY_MAJOR, 64 + c->index); @@ -5994,7 +5965,6 @@ name: "ttyS", write: serial_console_write, device: serial_console_device, - wait_key: serial_console_wait_key, setup: serial_console_setup, flags: CON_PRINTBUFFER, index: -1, diff -urN linux-2.5.2-pre1/drivers/char/serial167.c linux/drivers/char/serial167.c --- linux-2.5.2-pre1/drivers/char/serial167.c Sun Sep 16 21:23:07 2001 +++ linux/drivers/char/serial167.c Tue Dec 25 16:50:13 2001 @@ -2806,58 +2806,6 @@ restore_flags(flags); } -/* This is a hack; if there are multiple chars waiting in the chip we - * discard all but the last one, and return that. The cd2401 is not really - * designed to be driven in polled mode. - */ - -int serial167_console_wait_key(struct console *co) -{ - volatile unsigned char *base_addr = (u_char *)BASE_ADDR; - unsigned long flags; - volatile u_char sink; - u_char ier; - int port; - int keypress = 0; - - save_flags(flags); cli(); - - /* Ensure receiver is enabled! */ - - port = 0; - base_addr[CyCAR] = (u_char)port; - while (base_addr[CyCCR]) - ; - base_addr[CyCCR] = CyENB_RCVR; - ier = base_addr[CyIER]; - base_addr[CyIER] = CyRxData; - - while (!keypress) { - if (pcc2chip[PccSCCRICR] & 0x20) - { - /* We have an Rx int. Acknowledge it */ - sink = pcc2chip[PccRPIACKR]; - if ((base_addr[CyLICR] >> 2) == port) { - int cnt = base_addr[CyRFOC]; - while (cnt-- > 0) - { - keypress = base_addr[CyRDR]; - } - base_addr[CyREOIR] = 0; - } - else - base_addr[CyREOIR] = CyNOTRANS; - } - } - - base_addr[CyIER] = ier; - - restore_flags(flags); - - return keypress; -} - - static kdev_t serial167_console_device(struct console *c) { return MKDEV(TTY_MAJOR, 64 + c->index); @@ -2874,7 +2822,6 @@ name: "ttyS", write: serial167_console_write, device: serial167_console_device, - wait_key: serial167_console_wait_key, setup: serial167_console_setup, flags: CON_PRINTBUFFER, index: -1, diff -urN linux-2.5.2-pre1/drivers/char/serial_21285.c linux/drivers/char/serial_21285.c --- linux-2.5.2-pre1/drivers/char/serial_21285.c Thu Sep 13 15:21:32 2001 +++ linux/drivers/char/serial_21285.c Tue Dec 25 16:50:13 2001 @@ -389,17 +389,6 @@ enable_irq(IRQ_CONTX); } -static int rs285_console_wait_key(struct console *co) -{ - int c; - - disable_irq(IRQ_CONRX); - while (*CSR_UARTFLG & 0x10); - c = *CSR_UARTDR; - enable_irq(IRQ_CONRX); - return c; -} - static kdev_t rs285_console_device(struct console *c) { return MKDEV(SERIAL_21285_MAJOR, SERIAL_21285_MINOR); @@ -493,7 +482,6 @@ name: SERIAL_21285_NAME, write: rs285_console_write, device: rs285_console_device, - wait_key: rs285_console_wait_key, setup: rs285_console_setup, flags: CON_PRINTBUFFER, index: -1, diff -urN linux-2.5.2-pre1/drivers/char/serial_amba.c linux/drivers/char/serial_amba.c --- linux-2.5.2-pre1/drivers/char/serial_amba.c Sun Sep 16 21:23:14 2001 +++ linux/drivers/char/serial_amba.c Tue Dec 25 16:50:13 2001 @@ -1921,22 +1921,6 @@ UART_PUT_CR(port, old_cr); } -/* - * Receive character from the serial port - */ -static int ambauart_console_wait_key(struct console *co) -{ - struct amba_port *port = &amba_ports[co->index]; - unsigned int status; - int c; - - do { - status = UART_GET_FR(port); - } while (!UART_RX_DATA(status)); - c = UART_GET_CHAR(port); - return c; -} - static kdev_t ambauart_console_device(struct console *c) { return MKDEV(SERIAL_AMBA_MAJOR, SERIAL_AMBA_MINOR + c->index); @@ -2015,7 +1999,6 @@ read: ambauart_console_read, #endif device: ambauart_console_device, - wait_key: ambauart_console_wait_key, setup: ambauart_console_setup, flags: CON_PRINTBUFFER, index: -1, diff -urN linux-2.5.2-pre1/drivers/char/serial_tx3912.c linux/drivers/char/serial_tx3912.c --- linux-2.5.2-pre1/drivers/char/serial_tx3912.c Fri Nov 9 14:01:21 2001 +++ linux/drivers/char/serial_tx3912.c Tue Dec 25 16:50:13 2001 @@ -993,21 +993,6 @@ IntEnable2 = int2; } -static int serial_console_wait_key(struct console *co) -{ - unsigned int int2, res; - - int2 = IntEnable2; - IntEnable2 = 0; - - while (!(UartA_Ctrl1 & UART_RX_HOLD_FULL)); - res = UartA_Data; - udelay(10); - - IntEnable2 = int2; - return res; -} - static void serial_console_write(struct console *co, const char *s, unsigned count) { @@ -1065,7 +1050,6 @@ name: "ttyS", write: serial_console_write, device: serial_console_device, - wait_key: serial_console_wait_key, setup: serial_console_setup, flags: CON_PRINTBUFFER, index: -1 diff -urN linux-2.5.2-pre1/drivers/char/sh-sci.c linux/drivers/char/sh-sci.c --- linux-2.5.2-pre1/drivers/char/sh-sci.c Mon Oct 15 13:36:48 2001 +++ linux/drivers/char/sh-sci.c Tue Dec 25 16:50:13 2001 @@ -1181,15 +1181,6 @@ put_string(sercons_port, s, count); } -/* - * Receive character from the serial port - */ -static int serial_console_wait_key(struct console *co) -{ - /* Not implemented yet */ - return 0; -} - static kdev_t serial_console_device(struct console *c) { return MKDEV(SCI_MAJOR, SCI_MINOR_START + c->index); @@ -1273,7 +1264,6 @@ name: "ttySC", write: serial_console_write, device: serial_console_device, - wait_key: serial_console_wait_key, setup: serial_console_setup, flags: CON_PRINTBUFFER, index: -1, diff -urN linux-2.5.2-pre1/drivers/char/tty_io.c linux/drivers/char/tty_io.c --- linux-2.5.2-pre1/drivers/char/tty_io.c Thu Nov 29 20:48:58 2001 +++ linux/drivers/char/tty_io.c Tue Dec 25 16:50:13 2001 @@ -597,12 +597,6 @@ read_unlock(&tasklist_lock); } -void wait_for_keypress(void) -{ - struct console *c = console_drivers; - if (c) c->wait_key(c); -} - void stop_tty(struct tty_struct *tty) { if (tty->stopped) diff -urN linux-2.5.2-pre1/drivers/char/vme_scc.c linux/drivers/char/vme_scc.c --- linux-2.5.2-pre1/drivers/char/vme_scc.c Sun Sep 16 21:22:50 2001 +++ linux/drivers/char/vme_scc.c Tue Dec 25 16:50:13 2001 @@ -1065,41 +1065,6 @@ restore_flags(flags); } - -static int scc_console_wait_key(struct console *co) -{ - unsigned long flags; - volatile char *p = NULL; - int c; - -#ifdef CONFIG_MVME147_SCC - if (MACH_IS_MVME147) - p = (volatile char *)M147_SCC_A_ADDR; -#endif -#ifdef CONFIG_MVME162_SCC - if (MACH_IS_MVME16x) - p = (volatile char *)MVME_SCC_A_ADDR; -#endif -#ifdef CONFIG_BVME6000_SCC - if (MACH_IS_BVME6000) - p = (volatile char *)BVME_SCC_A_ADDR; -#endif - - save_flags(flags); - cli(); - - /* wait for rx buf filled */ - while ((*p & 0x01) == 0) - ; - - *p = 8; - scc_delay(); - c = *p; - restore_flags(flags); - return c; -} - - static kdev_t scc_console_device(struct console *c) { return MKDEV(TTY_MAJOR, SCC_MINOR_BASE + c->index); @@ -1116,7 +1081,6 @@ name: "ttyS", write: scc_console_write, device: scc_console_device, - wait_key: scc_console_wait_key, setup: scc_console_setup, flags: CON_PRINTBUFFER, index: -1, diff -urN linux-2.5.2-pre1/drivers/macintosh/mac_keyb.c linux/drivers/macintosh/mac_keyb.c --- linux-2.5.2-pre1/drivers/macintosh/mac_keyb.c Tue Sep 18 14:23:14 2001 +++ linux/drivers/macintosh/mac_keyb.c Tue Dec 25 16:50:13 2001 @@ -256,7 +256,6 @@ #endif extern struct kbd_struct kbd_table[]; -extern wait_queue_head_t keypress_wait; extern void handle_scancode(unsigned char, int); @@ -423,7 +422,6 @@ struct tty_struct *tty; tty = console_driver.table? console_driver.table[fg_console]: NULL; - wake_up(&keypress_wait); if (tty) { tty_insert_flip_char(tty, ch, 0); con_schedule_flip(tty); diff -urN linux-2.5.2-pre1/drivers/macintosh/macserial.c linux/drivers/macintosh/macserial.c --- linux-2.5.2-pre1/drivers/macintosh/macserial.c Mon Oct 15 13:43:24 2001 +++ linux/drivers/macintosh/macserial.c Tue Dec 25 16:50:13 2001 @@ -2792,30 +2792,6 @@ /* Don't disable the transmitter. */ } -/* - * Receive character from the serial port - */ -static int serial_console_wait_key(struct console *co) -{ - struct mac_serial *info = zs_soft + co->index; - int val; - - /* Turn of interrupts and enable the transmitter. */ - write_zsreg(info->zs_channel, R1, info->curregs[1] & ~INT_ALL_Rx); - write_zsreg(info->zs_channel, R3, info->curregs[3] | RxENABLE); - - /* Wait for something in the receive buffer. */ - while((read_zsreg(info->zs_channel, 0) & Rx_CH_AV) == 0) - eieio(); - val = read_zsdata(info->zs_channel); - - /* Restore the values in the registers. */ - write_zsreg(info->zs_channel, R1, info->curregs[1]); - write_zsreg(info->zs_channel, R3, info->curregs[3]); - - return val; -} - static kdev_t serial_console_device(struct console *c) { return MKDEV(TTY_MAJOR, 64 + c->index); @@ -3006,7 +2982,6 @@ name: "ttyS", write: serial_console_write, device: serial_console_device, - wait_key: serial_console_wait_key, setup: serial_console_setup, flags: CON_PRINTBUFFER, index: -1, diff -urN linux-2.5.2-pre1/drivers/s390/char/tuball.c linux/drivers/s390/char/tuball.c --- linux-2.5.2-pre1/drivers/s390/char/tuball.c Thu Oct 11 09:43:29 2001 +++ linux/drivers/s390/char/tuball.c Tue Dec 25 16:50:14 2001 @@ -84,7 +84,6 @@ tub3270_con_write, /* write */ NULL, /* read */ tub3270_con_device, /* device */ - NULL, /* wait_key */ tub3270_con_unblank, /* unblank */ NULL, /* setup */ CON_PRINTBUFFER, /* flags */ diff -urN linux-2.5.2-pre1/drivers/sbus/char/sab82532.c linux/drivers/sbus/char/sab82532.c --- linux-2.5.2-pre1/drivers/sbus/char/sab82532.c Wed Oct 17 14:16:39 2001 +++ linux/drivers/sbus/char/sab82532.c Tue Dec 25 16:50:14 2001 @@ -361,10 +361,6 @@ writeb(SAB82532_CMDR_RMC, &info->regs->w.cmdr); } -#ifdef CONFIG_SERIAL_CONSOLE - if (info->is_console) - wake_up(&keypress_wait); -#endif if (!tty) return; @@ -2541,13 +2537,6 @@ sab82532_tec_wait(info); } -static int -sab82532_console_wait_key(struct console *con) -{ - sleep_on(&keypress_wait); - return 0; -} - static kdev_t sab82532_console_device(struct console *con) { @@ -2622,7 +2611,6 @@ name: "ttyS", write: sab82532_console_write, device: sab82532_console_device, - wait_key: sab82532_console_wait_key, setup: sab82532_console_setup, flags: CON_PRINTBUFFER, index: -1, diff -urN linux-2.5.2-pre1/drivers/sbus/char/su.c linux/drivers/sbus/char/su.c --- linux-2.5.2-pre1/drivers/sbus/char/su.c Tue Nov 13 09:16:05 2001 +++ linux/drivers/sbus/char/su.c Tue Dec 25 16:50:14 2001 @@ -2854,40 +2854,6 @@ su_outb(info, UART_IER, ier); } -/* - * Receive character from the serial port - */ -static int -serial_console_wait_key(struct console *co) -{ - struct su_struct *info; - int ier; - int lsr; - int c; - - info = su_table + co->index; - - /* - * First save the IER then disable the interrupts so - * that the real driver for the port does not get the - * character. - */ - ier = su_inb(info, UART_IER); - su_outb(info, UART_IER, 0x00); - - do { - lsr = su_inb(info, UART_LSR); - } while (!(lsr & UART_LSR_DR)); - c = su_inb(info, UART_RX); - - /* - * Restore the interrupts - */ - su_outb(info, UART_IER, ier); - - return c; -} - static kdev_t serial_console_device(struct console *c) { @@ -3013,7 +2979,6 @@ name: "ttyS", write: serial_console_write, device: serial_console_device, - wait_key: serial_console_wait_key, setup: serial_console_setup, flags: CON_PRINTBUFFER, index: -1, diff -urN linux-2.5.2-pre1/drivers/sbus/char/sunkbd.c linux/drivers/sbus/char/sunkbd.c --- linux-2.5.2-pre1/drivers/sbus/char/sunkbd.c Sun Sep 16 21:22:50 2001 +++ linux/drivers/sbus/char/sunkbd.c Tue Dec 25 16:50:14 2001 @@ -82,16 +82,6 @@ struct l1a_kbd_state l1a_state; -#ifndef CONFIG_PCI -DECLARE_WAIT_QUEUE_HEAD(keypress_wait); -#endif - -int keyboard_wait_for_keypress(struct console *co) -{ - sleep_on(&keypress_wait); - return 0; -} - static spinlock_t sunkbd_lock = SPIN_LOCK_UNLOCKED; /* @@ -629,7 +619,6 @@ static void put_queue(int ch) { - wake_up(&keypress_wait); if (tty) { tty_insert_flip_char(tty, ch, 0); con_schedule_flip(tty); @@ -638,7 +627,6 @@ static void puts_queue(char *cp) { - wake_up(&keypress_wait); if (!tty) return; diff -urN linux-2.5.2-pre1/drivers/sbus/char/zs.c linux/drivers/sbus/char/zs.c --- linux-2.5.2-pre1/drivers/sbus/char/zs.c Tue Oct 30 15:08:11 2001 +++ linux/drivers/sbus/char/zs.c Tue Dec 25 16:50:14 2001 @@ -532,8 +532,6 @@ /* Continue execution... */ return; } - /* It is a 'keyboard interrupt' ;-) */ - wake_up(&keypress_wait); } #ifndef __sparc_v9__ /* Look for kgdb 'stop' character, consult the gdb @@ -2761,13 +2759,6 @@ #endif } -static int -zs_console_wait_key(struct console *con) -{ - sleep_on(&keypress_wait); - return 0; -} - static kdev_t zs_console_device(struct console *con) { return MKDEV(TTY_MAJOR, 64 + con->index); @@ -2845,7 +2836,6 @@ name: "ttyS", write: zs_console_write, device: zs_console_device, - wait_key: zs_console_wait_key, setup: zs_console_setup, flags: CON_PRINTBUFFER, index: -1, diff -urN linux-2.5.2-pre1/drivers/sgi/char/sgiserial.c linux/drivers/sgi/char/sgiserial.c --- linux-2.5.2-pre1/drivers/sgi/char/sgiserial.c Mon Aug 27 08:56:31 2001 +++ linux/drivers/sgi/char/sgiserial.c Tue Dec 25 16:50:14 2001 @@ -49,8 +49,6 @@ #define NUM_SERIAL 1 /* One chip on board. */ #define NUM_CHANNELS (NUM_SERIAL * 2) -extern wait_queue_head_t keypress_wait; - struct sgi_zslayout *zs_chips[NUM_SERIAL] = { 0, }; struct sgi_zschannel *zs_channels[NUM_CHANNELS] = { 0, 0, }; struct sgi_zschannel *zs_conschan; @@ -428,8 +426,6 @@ show_buffers(); return; } - /* It is a 'keyboard interrupt' ;-) */ - wake_up(&keypress_wait); } /* Look for kgdb 'stop' character, consult the gdb documentation * for remote target debugging and arch/sparc/kernel/sparc-stub.c @@ -2117,12 +2113,6 @@ rs_fair_output(); } -static int zs_console_wait_key(struct console *con) -{ - sleep_on(&keypress_wait); - return 0; -} - static kdev_t zs_console_device(struct console *con) { return MKDEV(TTY_MAJOR, 64 + con->index); @@ -2274,7 +2264,6 @@ name: "ttyS", write: zs_console_write, device: zs_console_device, - wait_key: zs_console_wait_key, setup: zs_console_setup, flags: CON_PRINTBUFFER, index: -1, diff -urN linux-2.5.2-pre1/drivers/tc/zs.c linux/drivers/tc/zs.c --- linux-2.5.2-pre1/drivers/tc/zs.c Mon Aug 27 08:56:31 2001 +++ linux/drivers/tc/zs.c Tue Dec 25 16:50:14 2001 @@ -2125,18 +2125,6 @@ } } -/* - * Receive character from the serial port - */ -static int serial_console_wait_key(struct console *co) -{ - struct dec_serial *info; - - info = zs_soft + co->index; - - return zs_poll_rx_char(info); -} - static kdev_t serial_console_device(struct console *c) { return MKDEV(TTY_MAJOR, 64 + c->index); @@ -2271,7 +2259,6 @@ name: "ttyS", write: serial_console_write, device: serial_console_device, - wait_key: serial_console_wait_key, setup: serial_console_setup, flags: CON_PRINTBUFFER, index: -1, diff -urN linux-2.5.2-pre1/fs/Config.in linux/fs/Config.in --- linux-2.5.2-pre1/fs/Config.in Thu Nov 29 17:39:02 2001 +++ linux/fs/Config.in Tue Dec 25 16:50:14 2001 @@ -45,7 +45,7 @@ fi tristate 'Compressed ROM file system support' CONFIG_CRAMFS bool 'Virtual memory file system support (former shm fs)' CONFIG_TMPFS -tristate 'Simple RAM-based file system support' CONFIG_RAMFS +define_bool CONFIG_RAMFS y tristate 'ISO 9660 CDROM file system support' CONFIG_ISO9660_FS dep_mbool ' Microsoft Joliet CDROM extensions' CONFIG_JOLIET $CONFIG_ISO9660_FS diff -urN linux-2.5.2-pre1/fs/adfs/super.c linux/fs/adfs/super.c --- linux-2.5.2-pre1/fs/adfs/super.c Sun Dec 16 12:22:46 2001 +++ linux/fs/adfs/super.c Tue Dec 25 16:50:14 2001 @@ -319,8 +319,7 @@ if (parse_options(sb, data)) goto error; - sb->s_blocksize = BLOCK_SIZE; - set_blocksize(dev, BLOCK_SIZE); + sb_set_blocksize(sb, BLOCK_SIZE); if (!(bh = sb_bread(sb, ADFS_DISCRECORD / BLOCK_SIZE))) { adfs_error(sb, "unable to read superblock"); goto error; @@ -347,14 +346,8 @@ goto error_free_bh; } - sb->s_blocksize_bits = dr->log2secsize; - sb->s_blocksize = 1 << sb->s_blocksize_bits; - if (sb->s_blocksize != BLOCK_SIZE && - (sb->s_blocksize == 512 || sb->s_blocksize == 1024 || - sb->s_blocksize == 2048 || sb->s_blocksize == 4096)) { - - brelse(bh); - set_blocksize(dev, sb->s_blocksize); + brelse(bh); + if (sb_set_blocksize(sb, 1 << dr->log2secsize)) { bh = sb_bread(sb, ADFS_DISCRECORD / sb->s_blocksize); if (!bh) { adfs_error(sb, "couldn't read superblock on " @@ -367,12 +360,11 @@ goto error_free_bh; } dr = (struct adfs_discrecord *)(b_data + ADFS_DR_OFFSET); - } - if (sb->s_blocksize != bh->b_size) { + } else { if (!silent) printk(KERN_ERR "VFS: Unsupported blocksize on dev " "%s.\n", bdevname(dev)); - goto error_free_bh; + goto error; } /* diff -urN linux-2.5.2-pre1/fs/affs/super.c linux/fs/affs/super.c --- linux-2.5.2-pre1/fs/affs/super.c Sun Dec 16 12:22:46 2001 +++ linux/fs/affs/super.c Tue Dec 25 16:50:14 2001 @@ -327,10 +327,6 @@ got_root: root_block = AFFS_SB->s_root_block; - sb->s_blocksize_bits = blocksize == 512 ? 9 : - blocksize == 1024 ? 10 : - blocksize == 2048 ? 11 : 12; - /* Find out which kind of FS we have */ boot_bh = sb_bread(sb, 0); if (!boot_bh) { diff -urN linux-2.5.2-pre1/fs/bfs/inode.c linux/fs/bfs/inode.c --- linux-2.5.2-pre1/fs/bfs/inode.c Sun Dec 16 12:22:53 2001 +++ linux/fs/bfs/inode.c Tue Dec 25 16:50:14 2001 @@ -248,9 +248,7 @@ int i, imap_len; dev = s->s_dev; - set_blocksize(dev, BFS_BSIZE); - s->s_blocksize = BFS_BSIZE; - s->s_blocksize_bits = BFS_BSIZE_BITS; + sb_set_blocksize(s, BFS_BSIZE); bh = sb_bread(s, 0); if(!bh) diff -urN linux-2.5.2-pre1/fs/block_dev.c linux/fs/block_dev.c --- linux-2.5.2-pre1/fs/block_dev.c Tue Dec 11 16:47:44 2001 +++ linux/fs/block_dev.c Tue Dec 25 16:50:14 2001 @@ -102,6 +102,26 @@ return 0; } +int sb_set_blocksize(struct super_block *sb, int size) +{ + int bits; + if (set_blocksize(sb->s_dev, size) < 0) + return 0; + sb->s_blocksize = size; + for (bits = 9, size >>= 9; size >>= 1; bits++) + ; + sb->s_blocksize_bits = bits; + return sb->s_blocksize; +} + +int sb_min_blocksize(struct super_block *sb, int size) +{ + int minsize = get_hardsect_size(sb->s_dev); + if (size < minsize) + size = minsize; + return sb_set_blocksize(sb, size); +} + static int blkdev_get_block(struct inode * inode, sector_t iblock, struct buffer_head * bh, int create) { if (iblock >= max_block(inode->i_rdev)) diff -urN linux-2.5.2-pre1/fs/cramfs/inode.c linux/fs/cramfs/inode.c --- linux-2.5.2-pre1/fs/cramfs/inode.c Sun Dec 16 12:22:53 2001 +++ linux/fs/cramfs/inode.c Tue Dec 25 16:50:14 2001 @@ -195,9 +195,7 @@ unsigned long root_offset; struct super_block * retval = NULL; - set_blocksize(sb->s_dev, PAGE_CACHE_SIZE); - sb->s_blocksize = PAGE_CACHE_SIZE; - sb->s_blocksize_bits = PAGE_CACHE_SHIFT; + sb_set_blocksize(sb, PAGE_CACHE_SIZE); /* Invalidate the read buffers on mount: think disk change.. */ for (i = 0; i < READ_BUFFERS; i++) diff -urN linux-2.5.2-pre1/fs/devfs/util.c linux/fs/devfs/util.c --- linux-2.5.2-pre1/fs/devfs/util.c Thu Oct 11 09:43:30 2001 +++ linux/fs/devfs/util.c Tue Dec 25 16:50:14 2001 @@ -61,67 +61,6 @@ /* Private functions follow */ /** - * _devfs_convert_name - Convert from an old style location-based name to new style. - * @new: The new name will be written here. - * @old: The old name. - * @disc: If true, disc partitioning information should be processed. - */ - -static void __init _devfs_convert_name (char *new, const char *old, int disc) -{ - int host, bus, target, lun; - char *ptr; - char part[8]; - - /* Decode "c#b#t#u#" */ - if (old[0] != 'c') return; - host = simple_strtol (old + 1, &ptr, 10); - if (ptr[0] != 'b') return; - bus = simple_strtol (ptr + 1, &ptr, 10); - if (ptr[0] != 't') return; - target = simple_strtol (ptr + 1, &ptr, 10); - if (ptr[0] != 'u') return; - lun = simple_strtol (ptr + 1, &ptr, 10); - if (disc) - { - /* Decode "p#" */ - if (ptr[0] == 'p') sprintf (part, "part%s", ptr + 1); - else strcpy (part, "disc"); - } - else part[0] = '\0'; - sprintf (new, "/host%d/bus%d/target%d/lun%d/%s", - host, bus, target, lun, part); -} /* End Function _devfs_convert_name */ - - -/* Public functions follow */ - -/** - * devfs_make_root - Create the root FS device entry if required. - * @name: The name of the root FS device, as passed by "root=". - */ - -void __init devfs_make_root (const char *name) -{ - char dest[64]; - - if ( (strncmp (name, "sd/", 3) == 0) || (strncmp (name, "sr/", 3) == 0) ) - { - strcpy (dest, "../scsi"); - _devfs_convert_name (dest + 7, name + 3, (name[1] == 'd') ? 1 : 0); - } - else if ( (strncmp (name, "ide/hd/", 7) == 0) || - (strncmp (name, "ide/cd/", 7) == 0) ) - { - strcpy (dest, ".."); - _devfs_convert_name (dest + 2, name + 7, (name[4] == 'h') ? 1 : 0); - } - else return; - devfs_mk_symlink (NULL, name, DEVFS_FL_DEFAULT, dest, NULL, NULL); -} /* End Function devfs_make_root */ - - -/** * devfs_register_tape - Register a tape device in the "/dev/tapes" hierarchy. * @de: Any tape device entry in the device directory. */ diff -urN linux-2.5.2-pre1/fs/efs/super.c linux/fs/efs/super.c --- linux-2.5.2-pre1/fs/efs/super.c Sun Dec 16 12:23:00 2001 +++ linux/fs/efs/super.c Tue Dec 25 16:50:14 2001 @@ -132,16 +132,13 @@ } struct super_block *efs_read_super(struct super_block *s, void *d, int silent) { - kdev_t dev = s->s_dev; struct efs_sb_info *sb; struct buffer_head *bh; sb = SUPER_INFO(s); s->s_magic = EFS_SUPER_MAGIC; - s->s_blocksize = EFS_BLOCKSIZE; - s->s_blocksize_bits = EFS_BLOCKSIZE_BITS; - set_blocksize(dev, EFS_BLOCKSIZE); + sb_set_blocksize(s, EFS_BLOCKSIZE); /* read the vh (volume header) block */ bh = sb_bread(s, 0); diff -urN linux-2.5.2-pre1/fs/ext2/super.c linux/fs/ext2/super.c --- linux-2.5.2-pre1/fs/ext2/super.c Sun Dec 16 12:23:00 2001 +++ linux/fs/ext2/super.c Tue Dec 25 16:50:14 2001 @@ -418,9 +418,6 @@ * This is important for devices that have a hardware * sectorsize that is larger than the default. */ - blocksize = get_hardsect_size(dev); - if(blocksize < BLOCK_SIZE ) - blocksize = BLOCK_SIZE; sb->u.ext2_sb.s_mount_opt = 0; if (!parse_options ((char *) data, &sb_block, &resuid, &resgid, @@ -428,11 +425,11 @@ return NULL; } - if (set_blocksize(dev, blocksize) < 0) { - printk ("EXT2-fs: unable to set blocksize %d\n", blocksize); + blocksize = sb_min_blocksize(sb, BLOCK_SIZE); + if (!blocksize) { + printk ("EXT2-fs: unable to set blocksize\n"); return NULL; } - sb->s_blocksize = blocksize; /* * If the superblock doesn't start on a sector boundary, @@ -485,18 +482,12 @@ bdevname(dev), i); goto failed_mount; } - sb->s_blocksize_bits = - le32_to_cpu(EXT2_SB(sb)->s_es->s_log_block_size) + 10; - sb->s_blocksize = 1 << sb->s_blocksize_bits; - - sb->s_maxbytes = ext2_max_size(sb->s_blocksize_bits); - + blocksize = BLOCK_SIZE << le32_to_cpu(EXT2_SB(sb)->s_es->s_log_block_size); /* If the blocksize doesn't match, re-read the thing.. */ if (sb->s_blocksize != blocksize) { - blocksize = sb->s_blocksize; brelse(bh); - if (set_blocksize(dev, blocksize) < 0) { + if (!sb_set_blocksize(sb, blocksize)) { printk(KERN_ERR "EXT2-fs: blocksize too small for device.\n"); return NULL; } @@ -516,6 +507,8 @@ goto failed_mount; } } + + sb->s_maxbytes = ext2_max_size(sb->s_blocksize_bits); if (le32_to_cpu(es->s_rev_level) == EXT2_GOOD_OLD_REV) { sb->u.ext2_sb.s_inode_size = EXT2_GOOD_OLD_INODE_SIZE; diff -urN linux-2.5.2-pre1/fs/ext3/super.c linux/fs/ext3/super.c --- linux-2.5.2-pre1/fs/ext3/super.c Sun Dec 16 12:23:00 2001 +++ linux/fs/ext3/super.c Tue Dec 25 16:50:14 2001 @@ -912,10 +912,6 @@ * This is important for devices that have a hardware * sectorsize that is larger than the default. */ - blocksize = EXT3_MIN_BLOCK_SIZE; - hblock = get_hardsect_size(dev); - if (blocksize < hblock) - blocksize = hblock; sbi->s_mount_opt = 0; sbi->s_resuid = EXT3_DEF_RESUID; @@ -925,8 +921,7 @@ goto out_fail; } - sb->s_blocksize = blocksize; - set_blocksize (dev, blocksize); + blocksize = sb_min_blocksize(sb, EXT3_MIN_BLOCK_SIZE); /* * The ext3 superblock will not be buffer aligned for other than 1kB @@ -980,11 +975,10 @@ bdevname(dev), i); goto failed_mount; } - sb->s_blocksize_bits = le32_to_cpu(es->s_log_block_size) + 10; - sb->s_blocksize = 1 << sb->s_blocksize_bits; + blocksize = BLOCK_SIZE << le32_to_cpu(es->s_log_block_size); - if (sb->s_blocksize < EXT3_MIN_BLOCK_SIZE || - sb->s_blocksize > EXT3_MAX_BLOCK_SIZE) { + if (blocksize < EXT3_MIN_BLOCK_SIZE || + blocksize > EXT3_MAX_BLOCK_SIZE) { printk(KERN_ERR "EXT3-fs: Unsupported filesystem blocksize %d on %s.\n", blocksize, bdevname(dev)); @@ -993,21 +987,20 @@ sb->s_maxbytes = ext3_max_size(sb->s_blocksize_bits); + hblock = get_hardsect_size(dev); if (sb->s_blocksize != blocksize) { - blocksize = sb->s_blocksize; - /* * Make sure the blocksize for the filesystem is larger * than the hardware sectorsize for the machine. */ - if (sb->s_blocksize < hblock) { + if (blocksize < hblock) { printk(KERN_ERR "EXT3-fs: blocksize %d too small for " "device blocksize %d.\n", blocksize, hblock); goto failed_mount; } brelse (bh); - set_blocksize (dev, sb->s_blocksize); + sb_set_blocksize(sb, blocksize); logic_sb_block = (sb_block * EXT3_MIN_BLOCK_SIZE) / blocksize; offset = (sb_block * EXT3_MIN_BLOCK_SIZE) % blocksize; bh = sb_bread(sb, logic_sb_block); diff -urN linux-2.5.2-pre1/fs/fat/inode.c linux/fs/fat/inode.c --- linux-2.5.2-pre1/fs/fat/inode.c Sun Dec 16 12:23:00 2001 +++ linux/fs/fat/inode.c Tue Dec 25 16:50:14 2001 @@ -569,10 +569,6 @@ sb->s_maxbytes = MAX_NON_LFS; sb->s_op = &fat_sops; - hard_blksize = get_hardsect_size(sb->s_dev); - if (!hard_blksize) - hard_blksize = 512; - opts.isvfat = sbi->options.isvfat; if (!parse_options((char *) data, &fat, &debug, &opts, cvf_format, cvf_options)) @@ -582,8 +578,7 @@ fat_cache_init(); - sb->s_blocksize = hard_blksize; - set_blocksize(sb->s_dev, hard_blksize); + sb_min_blocksize(sb, 512); bh = sb_bread(sb, 0); if (bh == NULL) { printk("FAT: unable to read boot sector\n"); @@ -625,13 +620,15 @@ goto out_invalid; } - if (logical_sector_size < hard_blksize) { + if (logical_sector_size < sb->s_blocksize) { printk("FAT: logical sector size too small for device" " (logical sector size = %d)\n", logical_sector_size); brelse(bh); goto out_invalid; } + hard_blksize = sb->s_blocksize; + sbi->cluster_bits = ffs(logical_sector_size * sbi->cluster_size) - 1; sbi->fats = b->fats; sbi->fat_start = CF_LE_W(b->reserved); @@ -716,9 +713,7 @@ if (error) goto out_invalid; - sb->s_blocksize = logical_sector_size; - sb->s_blocksize_bits = ffs(logical_sector_size) - 1; - set_blocksize(sb->s_dev, sb->s_blocksize); + sb_set_blocksize(sb, logical_sector_size); sbi->cvf_format = &default_cvf; if (!strcmp(cvf_format, "none")) i = -1; @@ -802,7 +797,7 @@ out_invalid: if (!silent) { printk("VFS: Can't find a valid FAT filesystem on dev %s.\n", - kdevname(sb->s_dev)); + bdevname(sb->s_dev)); } out_fail: if (opts.iocharset) { diff -urN linux-2.5.2-pre1/fs/hfs/super.c linux/fs/hfs/super.c --- linux-2.5.2-pre1/fs/hfs/super.c Sun Dec 16 12:23:00 2001 +++ linux/fs/hfs/super.c Tue Dec 25 16:50:14 2001 @@ -401,9 +401,7 @@ } /* set the device driver to 512-byte blocks */ - set_blocksize(dev, HFS_SECTOR_SIZE); - s->s_blocksize_bits = HFS_SECTOR_SIZE_BITS; - s->s_blocksize = HFS_SECTOR_SIZE; + sb_set_blocksize(s, HFS_SECTOR_SIZE); #ifdef CONFIG_MAC_PARTITION /* check to see if we're in a partition */ diff -urN linux-2.5.2-pre1/fs/hpfs/super.c linux/fs/hpfs/super.c --- linux-2.5.2-pre1/fs/hpfs/super.c Tue Dec 25 16:50:12 2001 +++ linux/fs/hpfs/super.c Tue Dec 25 16:50:14 2001 @@ -409,9 +409,7 @@ /*s->s_hpfs_mounting = 1;*/ dev = s->s_dev; - set_blocksize(dev, 512); - s->s_blocksize = 512; - s->s_blocksize_bits = 9; + sb_set_blocksize(s, 512); s->s_hpfs_fs_size = -1; if (!(bootblock = hpfs_map_sector(s, 0, &bh0, 0))) goto bail1; if (!(superblock = hpfs_map_sector(s, 16, &bh1, 1))) goto bail2; diff -urN linux-2.5.2-pre1/fs/isofs/inode.c linux/fs/isofs/inode.c --- linux-2.5.2-pre1/fs/isofs/inode.c Sun Dec 16 12:23:05 2001 +++ linux/fs/isofs/inode.c Tue Dec 25 16:50:14 2001 @@ -480,7 +480,6 @@ int iso_blknum, block; int orig_zonesize; int table; - unsigned int blocksize, blocksize_bits; unsigned int vol_desc_start; unsigned long first_data_zone; struct inode * inode; @@ -508,26 +507,10 @@ * larger than the blocksize the user specified, then use * that value. */ - blocksize = get_hardsect_size(dev); - if(blocksize > opt.blocksize) { - /* - * Force the blocksize we are going to use to be the - * hardware blocksize. - */ - opt.blocksize = blocksize; - } - - blocksize_bits = 0; - { - int i = opt.blocksize; - while (i != 1){ - blocksize_bits++; - i >>=1; - } - } - - set_blocksize(dev, opt.blocksize); - s->s_blocksize = opt.blocksize; + /* + * What if bugger tells us to go beyond page size? + */ + opt.blocksize = sb_min_blocksize(s, opt.blocksize); s->u.isofs_sb.s_high_sierra = high_sierra = 0; /* default is iso9660 */ @@ -540,7 +523,7 @@ struct hs_volume_descriptor * hdp; struct iso_volume_descriptor * vdp; - block = iso_blknum << (ISOFS_BLOCK_BITS-blocksize_bits); + block = iso_blknum << (ISOFS_BLOCK_BITS - s->s_blocksize_bits); if (!(bh = sb_bread(s, block))) goto out_no_read; @@ -651,7 +634,7 @@ * blocks that were 512 bytes (which should only very rarely * happen.) */ - if(blocksize != 0 && orig_zonesize < blocksize) + if(orig_zonesize < opt.blocksize) goto out_bad_size; /* RDE: convert log zone size to bit shift */ @@ -734,15 +717,7 @@ * entries. By forcing the blocksize in this way, we ensure * that we will never be required to do this. */ - if ( orig_zonesize != opt.blocksize ) { - set_blocksize(dev, orig_zonesize); -#ifndef BEQUIET - printk(KERN_DEBUG - "ISOFS: Forcing new log zone size:%d\n", orig_zonesize); -#endif - } - s->s_blocksize = orig_zonesize; - s->s_blocksize_bits = s -> u.isofs_sb.s_log_zone_size; + sb_set_blocksize(s, orig_zonesize); s->u.isofs_sb.s_nls_iocharset = NULL; @@ -853,7 +828,7 @@ goto out_freebh; out_bad_size: printk(KERN_WARNING "Logical zone size(%d) < hardware blocksize(%u)\n", - orig_zonesize, blocksize); + orig_zonesize, opt.blocksize); goto out_freebh; #ifndef IGNORE_WRONG_MULTI_VOLUME_SPECS out_no_support: diff -urN linux-2.5.2-pre1/fs/minix/inode.c linux/fs/minix/inode.c --- linux-2.5.2-pre1/fs/minix/inode.c Sun Dec 16 12:23:05 2001 +++ linux/fs/minix/inode.c Tue Dec 25 16:50:14 2001 @@ -126,9 +126,7 @@ struct buffer_head **map; struct minix_super_block *ms; int i, block; - kdev_t dev = s->s_dev; struct inode *root_inode; - unsigned int hblock; struct minix_sb_info *sbi = &s->u.minix_sb; /* N.B. These should be compile-time tests. @@ -138,13 +136,9 @@ if (64 != sizeof(struct minix2_inode)) panic("bad V2 i-node size"); - hblock = get_hardsect_size(dev); - if (hblock > BLOCK_SIZE) + if (!sb_set_blocksize(s, BLOCK_SIZE)) goto out_bad_hblock; - set_blocksize(dev, BLOCK_SIZE); - s->s_blocksize = BLOCK_SIZE; - s->s_blocksize_bits = BLOCK_SIZE_BITS; if (!(bh = sb_bread(s, 1))) goto out_bad_sb; @@ -264,7 +258,7 @@ out_no_fs: if (!silent) printk("VFS: Can't find a Minix or Minix V2 filesystem on device " - "%s.\n", kdevname(dev)); + "%s.\n", bdevname(s->s_dev)); out_release: brelse(bh); goto out; diff -urN linux-2.5.2-pre1/fs/namespace.c linux/fs/namespace.c --- linux-2.5.2-pre1/fs/namespace.c Tue Dec 25 16:50:12 2001 +++ linux/fs/namespace.c Tue Dec 25 16:50:14 2001 @@ -16,6 +16,7 @@ #include #include #include +#include #include @@ -27,10 +28,6 @@ static int hash_mask, hash_bits; static kmem_cache_t *mnt_cache; -static LIST_HEAD(vfsmntlist); -static DECLARE_MUTEX(mount_sem); -static struct vfsmount *root_vfsmnt; - static inline unsigned long hash(struct vfsmount *mnt, struct dentry *dentry) { unsigned long tmp = ((unsigned long) mnt / L1_CACHE_BYTES); @@ -96,7 +93,7 @@ while (mnt->mnt_parent != mnt) mnt = mnt->mnt_parent; spin_unlock(&dcache_lock); - return mnt == root_vfsmnt; + return mnt == current->namespace->root; } static void detach_mnt(struct vfsmount *mnt, struct nameidata *old_nd) @@ -164,26 +161,29 @@ /* iterator */ static void *m_start(struct seq_file *m, loff_t *pos) { + struct namespace *n = m->private; struct list_head *p; - loff_t n = *pos; + loff_t l = *pos; - down(&mount_sem); - list_for_each(p, &vfsmntlist) - if (!n--) + down_read(&n->sem); + list_for_each(p, &n->list) + if (!l--) return list_entry(p, struct vfsmount, mnt_list); return NULL; } static void *m_next(struct seq_file *m, void *v, loff_t *pos) { + struct namespace *n = m->private; struct list_head *p = ((struct vfsmount *)v)->mnt_list.next; (*pos)++; - return p==&vfsmntlist ? NULL : list_entry(p, struct vfsmount, mnt_list); + return p==&n->list ? NULL : list_entry(p, struct vfsmount, mnt_list); } static void m_stop(struct seq_file *m, void *v) { - up(&mount_sem); + struct namespace *n = m->private; + up_read(&n->sem); } static inline void mangle(struct seq_file *m, const char *s) @@ -329,7 +329,7 @@ return retval; } - down(&mount_sem); + down_write(¤t->namespace->sem); spin_lock(&dcache_lock); if (atomic_read(&sb->s_active) == 1) { @@ -348,7 +348,7 @@ retval = 0; } spin_unlock(&dcache_lock); - up(&mount_sem); + up_write(¤t->namespace->sem); return retval; } @@ -478,7 +478,7 @@ struct list_head head; attach_mnt(mnt, nd); list_add_tail(&head, &mnt->mnt_list); - list_splice(&head, vfsmntlist.prev); + list_splice(&head, current->namespace->list.prev); mntget(mnt); err = 0; } @@ -505,7 +505,7 @@ if (err) return err; - down(&mount_sem); + down_write(¤t->namespace->sem); err = -EINVAL; if (check_mnt(nd->mnt) && (!recurse || check_mnt(old_nd.mnt))) { err = -ENOMEM; @@ -525,7 +525,7 @@ mntput(mnt); } - up(&mount_sem); + up_write(¤t->namespace->sem); path_release(&old_nd); return err; } @@ -572,7 +572,7 @@ if (err) return err; - down(&mount_sem); + down_write(¤t->namespace->sem); while(d_mountpoint(nd->dentry) && follow_down(&nd->mnt, &nd->dentry)) ; err = -EINVAL; @@ -612,7 +612,7 @@ out1: up(&nd->dentry->d_inode->i_zombie); out: - up(&mount_sem); + up_write(¤t->namespace->sem); if (!err) path_release(&parent_nd); path_release(&old_nd); @@ -637,7 +637,7 @@ if (IS_ERR(mnt)) goto out; - down(&mount_sem); + down_write(¤t->namespace->sem); /* Something was mounted here while we slept */ while(d_mountpoint(nd->dentry) && follow_down(&nd->mnt, &nd->dentry)) ; @@ -653,7 +653,7 @@ mnt->mnt_flags = mnt_flags; err = graft_tree(mnt, nd); unlock: - up(&mount_sem); + up_write(¤t->namespace->sem); mntput(mnt); out: return err; @@ -753,6 +753,86 @@ return retval; } +int copy_namespace(int flags, struct task_struct *tsk) +{ + struct namespace *namespace = tsk->namespace; + struct namespace *new_ns; + struct vfsmount *rootmnt = NULL, *pwdmnt = NULL, *altrootmnt = NULL; + struct fs_struct *fs = tsk->fs; + + if (!namespace) + return 0; + + get_namespace(namespace); + + if (! (flags & CLONE_NEWNS)) + return 0; + + if (!capable(CAP_SYS_ADMIN)) { + put_namespace(namespace); + return -EPERM; + } + + new_ns = kmalloc(sizeof(struct namespace *), GFP_KERNEL); + if (!new_ns) + goto out; + + atomic_set(&new_ns->count, 1); + init_rwsem(&new_ns->sem); + new_ns->root = NULL; + INIT_LIST_HEAD(&new_ns->list); + + down_write(&tsk->namespace->sem); + /* First pass: copy the tree topology */ + new_ns->root = copy_tree(namespace->root, namespace->root->mnt_root); + spin_lock(&dcache_lock); + list_add_tail(&new_ns->list, &new_ns->root->mnt_list); + spin_unlock(&dcache_lock); + + /* Second pass: switch the tsk->fs->* elements */ + if (fs) { + struct vfsmount *p, *q; + write_lock(&fs->lock); + + p = namespace->root; + q = new_ns->root; + while (p) { + if (p == fs->rootmnt) { + rootmnt = p; + fs->rootmnt = mntget(q); + } + if (p == fs->pwdmnt) { + pwdmnt = p; + fs->pwdmnt = mntget(q); + } + if (p == fs->altrootmnt) { + altrootmnt = p; + fs->altrootmnt = mntget(q); + } + p = next_mnt(p, namespace->root); + q = next_mnt(q, new_ns->root); + } + write_unlock(&fs->lock); + } + up_write(&tsk->namespace->sem); + + tsk->namespace = new_ns; + + if (rootmnt) + mntput(rootmnt); + if (pwdmnt) + mntput(pwdmnt); + if (altrootmnt) + mntput(altrootmnt); + + put_namespace(namespace); + return 0; + +out: + put_namespace(namespace); + return -ENOMEM; +} + asmlinkage long sys_mount(char * dev_name, char * dir_name, char * type, unsigned long flags, void * data) { @@ -871,7 +951,7 @@ user_nd.mnt = mntget(current->fs->rootmnt); user_nd.dentry = dget(current->fs->root); read_unlock(¤t->fs->lock); - down(&mount_sem); + down_write(¤t->namespace->sem); down(&old_nd.dentry->d_inode->i_zombie); error = -EINVAL; if (!check_mnt(user_nd.mnt)) @@ -916,7 +996,7 @@ path_release(&parent_nd); out2: up(&old_nd.dentry->d_inode->i_zombie); - up(&mount_sem); + up_write(¤t->namespace->sem); path_release(&user_nd); path_release(&old_nd); out1: @@ -929,95 +1009,34 @@ goto out2; } -/* - * Absolutely minimal fake fs - only empty root directory and nothing else. - * In 2.5 we'll use ramfs or tmpfs, but for now it's all we need - just - * something to go with root vfsmount. - */ -static struct inode_operations rootfs_dir_inode_operations; -static struct file_operations rootfs_dir_operations; -static int rootfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) -{ - struct inode * inode = new_inode(dir->i_sb); - int error = -ENOSPC; - if (inode) { - inode->i_mode = S_IFDIR|mode; - inode->i_uid = current->fsuid; - inode->i_gid = current->fsgid; - inode->i_op = &rootfs_dir_inode_operations; - inode->i_fop = &rootfs_dir_operations; - d_instantiate(dentry, inode); - dget(dentry); - error = 0; - } - return error; -} -static int rootfs_mknod(struct inode *dir, struct dentry *dentry, int mode, int dev) -{ - struct inode * inode = new_inode(dir->i_sb); - int error = -ENOSPC; - if (inode) { - inode->i_uid = current->fsuid; - inode->i_gid = current->fsgid; - init_special_inode(inode, mode, dev); - d_instantiate(dentry, inode); - dget(dentry); - error = 0; - } - return error; -} -static int rootfs_unlink(struct inode * dir, struct dentry *dentry) -{ - dentry->d_inode->i_nlink--; - dput(dentry); - return 0; -} -static struct dentry *rootfs_lookup(struct inode *dir, struct dentry *dentry) -{ - d_add(dentry, NULL); - return NULL; -} -static struct file_operations rootfs_dir_operations = { - read: generic_read_dir, - readdir: dcache_readdir, -}; -static struct inode_operations rootfs_dir_inode_operations = { - lookup: rootfs_lookup, - mkdir: rootfs_mkdir, - mknod: rootfs_mknod, - unlink: rootfs_unlink, -}; -static struct super_block *rootfs_read_super(struct super_block * sb, void * data, int silent) +static void __init init_mount_tree(void) { - struct inode * inode; - struct dentry * root; - static struct super_operations s_ops = {}; - sb->s_op = &s_ops; - inode = new_inode(sb); - if (!inode) - return NULL; - inode->i_mode = S_IFDIR|0555; - inode->i_uid = inode->i_gid = 0; - inode->i_op = &rootfs_dir_inode_operations; - inode->i_fop = &rootfs_dir_operations; - root = d_alloc_root(inode); - if (!root) { - iput(inode); - return NULL; + struct vfsmount *mnt; + struct namespace *namespace; + struct task_struct *p; + + mnt = do_kern_mount("rootfs", 0, "rootfs", NULL); + if (IS_ERR(mnt)) + panic("Can't create rootfs"); + namespace = kmalloc(sizeof(*namespace), GFP_KERNEL); + if (!namespace) + panic("Can't allocate initial namespace"); + atomic_set(&namespace->count, 1); + INIT_LIST_HEAD(&namespace->list); + init_rwsem(&namespace->sem); + list_add(&mnt->mnt_list, &namespace->list); + namespace->root = mnt; + + init_task.namespace = namespace; + read_lock(&tasklist_lock); + for_each_task(p) { + get_namespace(namespace); + p->namespace = namespace; } - sb->s_root = root; - return sb; -} -static DECLARE_FSTYPE(root_fs_type, "rootfs", rootfs_read_super, FS_NOMOUNT); + read_unlock(&tasklist_lock); -static void __init init_mount_tree(void) -{ - register_filesystem(&root_fs_type); - root_vfsmnt = do_kern_mount("rootfs", 0, "rootfs", NULL); - if (IS_ERR(root_vfsmnt)) - panic("can't allocate root vfsmount"); - set_fs_pwd(current->fs, root_vfsmnt, root_vfsmnt->mnt_root); - set_fs_root(current->fs, root_vfsmnt, root_vfsmnt->mnt_root); + set_fs_pwd(current->fs, namespace->root, namespace->root->mnt_root); + set_fs_root(current->fs, namespace->root, namespace->root->mnt_root); } void __init mnt_init(unsigned long mempages) @@ -1075,5 +1094,6 @@ d++; i--; } while (i); + init_rootfs(); init_mount_tree(); } diff -urN linux-2.5.2-pre1/fs/ntfs/fs.c linux/fs/ntfs/fs.c --- linux-2.5.2-pre1/fs/ntfs/fs.c Sun Dec 16 12:23:05 2001 +++ linux/fs/ntfs/fs.c Tue Dec 25 16:50:14 2001 @@ -1016,14 +1016,11 @@ init_ntfs_super_block(vol); if (!parse_options(vol, (char*)options)) goto ntfs_read_super_vol; - blocksize = get_hardsect_size(sb->s_dev); - if (blocksize < 512) - blocksize = 512; - if (set_blocksize(sb->s_dev, blocksize) < 0) { - ntfs_error("Unable to set blocksize %d.\n", blocksize); + blocksize = sb_min_blocksize(sb, 512); + if (!blocksize) { + ntfs_error("Unable to set blocksize.\n"); goto ntfs_read_super_vol; } - sb->s_blocksize = blocksize; /* Read the super block (boot block). */ if (!(bh = sb_bread(sb, 0))) { ntfs_error("Reading super block failed\n"); @@ -1052,10 +1049,7 @@ } ntfs_debug(DEBUG_OTHER, "Done to init volume\n"); /* Inform the kernel that a device block is a NTFS cluster. */ - sb->s_blocksize = vol->cluster_size; - sb->s_blocksize_bits = vol->cluster_size_bits; - if (blocksize != vol->cluster_size && - set_blocksize(sb->s_dev, sb->s_blocksize) < 0) { + if (!sb_set_blocksize(sb, vol->cluster_size)) { ntfs_error("Cluster size too small for device.\n"); goto ntfs_read_super_unl; } diff -urN linux-2.5.2-pre1/fs/proc/base.c linux/fs/proc/base.c --- linux-2.5.2-pre1/fs/proc/base.c Wed Oct 10 23:42:47 2001 +++ linux/fs/proc/base.c Tue Dec 25 16:50:14 2001 @@ -23,6 +23,8 @@ #include #include #include +#include +#include /* * For hysterical raisins we keep the same inumbers as in the old procfs. @@ -246,6 +248,46 @@ read: pid_maps_read, }; +extern struct seq_operations mounts_op; +static int mounts_open(struct inode *inode, struct file *file) +{ + struct task_struct *task = inode->u.proc_i.task; + int ret = seq_open(file, &mounts_op); + + if (!ret) { + struct seq_file *m = file->private_data; + struct namespace *namespace; + task_lock(task); + namespace = task->namespace; + if (namespace) + get_namespace(namespace); + task_unlock(task); + + if (namespace) + m->private = namespace; + else { + seq_release(inode, file); + ret = -EINVAL; + } + } + return ret; +} + +static int mounts_release(struct inode *inode, struct file *file) +{ + struct seq_file *m = file->private_data; + struct namespace *namespace = m->private; + put_namespace(namespace); + return seq_release(inode, file); +} + +static struct file_operations proc_mounts_operations = { + open: mounts_open, + read: seq_read, + llseek: seq_lseek, + release: mounts_release, +}; + #define PROC_BLOCK_SIZE (3*1024) /* 4K page size but our output routines use some slack for overruns */ static ssize_t proc_info_read(struct file * file, char * buf, @@ -497,6 +539,7 @@ PROC_PID_STATM, PROC_PID_MAPS, PROC_PID_CPU, + PROC_PID_MOUNTS, PROC_PID_FD_DIR = 0x8000, /* 0x8000-0xffff */ }; @@ -516,6 +559,7 @@ E(PROC_PID_CWD, "cwd", S_IFLNK|S_IRWXUGO), E(PROC_PID_ROOT, "root", S_IFLNK|S_IRWXUGO), E(PROC_PID_EXE, "exe", S_IFLNK|S_IRWXUGO), + E(PROC_PID_MOUNTS, "mounts", S_IFREG|S_IRUGO), {0,0,NULL,0} }; #undef E @@ -874,6 +918,9 @@ case PROC_PID_MEM: inode->i_op = &proc_mem_inode_operations; inode->i_fop = &proc_mem_operations; + break; + case PROC_PID_MOUNTS: + inode->i_fop = &proc_mounts_operations; break; default: printk("procfs: impossible type (%d)",p->type); diff -urN linux-2.5.2-pre1/fs/proc/proc_misc.c linux/fs/proc/proc_misc.c --- linux-2.5.2-pre1/fs/proc/proc_misc.c Thu Nov 29 07:49:55 2001 +++ linux/fs/proc/proc_misc.c Tue Dec 25 16:50:14 2001 @@ -500,18 +500,6 @@ write: write_profile, }; -extern struct seq_operations mounts_op; -static int mounts_open(struct inode *inode, struct file *file) -{ - return seq_open(file, &mounts_op); -} -static struct file_operations proc_mounts_operations = { - open: mounts_open, - read: seq_read, - llseek: seq_lseek, - release: seq_release, -}; - struct proc_dir_entry *proc_root_kcore; static void create_seq_entry(char *name, mode_t mode, struct file_operations *f) @@ -555,11 +543,12 @@ for (p = simple_ones; p->name; p++) create_proc_read_entry(p->name, 0, NULL, p->read_proc, NULL); + proc_symlink("mounts", NULL, "self/mounts"); + /* And now for trickier ones */ entry = create_proc_entry("kmsg", S_IRUSR, &proc_root); if (entry) entry->proc_fops = &proc_kmsg_operations; - create_seq_entry("mounts", 0, &proc_mounts_operations); create_seq_entry("cpuinfo", 0, &proc_cpuinfo_operations); create_seq_entry("interrupts", 0, &proc_interrupts_operations); #ifdef CONFIG_MODULES diff -urN linux-2.5.2-pre1/fs/qnx4/inode.c linux/fs/qnx4/inode.c --- linux-2.5.2-pre1/fs/qnx4/inode.c Sun Dec 16 12:23:05 2001 +++ linux/fs/qnx4/inode.c Tue Dec 25 16:50:14 2001 @@ -339,13 +339,10 @@ void *data, int silent) { struct buffer_head *bh; - kdev_t dev = s->s_dev; struct inode *root; const char *errmsg; - set_blocksize(dev, QNX4_BLOCK_SIZE); - s->s_blocksize = QNX4_BLOCK_SIZE; - s->s_blocksize_bits = QNX4_BLOCK_SIZE_BITS; + sb_set_blocksize(s, QNX4_BLOCK_SIZE); /* Check the boot signature. Since the qnx4 code is dangerous, we should leave as quickly as possible diff -urN linux-2.5.2-pre1/fs/ramfs/inode.c linux/fs/ramfs/inode.c --- linux-2.5.2-pre1/fs/ramfs/inode.c Wed Oct 24 15:19:18 2001 +++ linux/fs/ramfs/inode.c Tue Dec 25 16:50:14 2001 @@ -325,6 +325,7 @@ } static DECLARE_FSTYPE(ramfs_fs_type, "ramfs", ramfs_read_super, FS_LITTER); +static DECLARE_FSTYPE(rootfs_fs_type, "rootfs", ramfs_read_super, FS_NOMOUNT|FS_LITTER); static int __init init_ramfs_fs(void) { @@ -338,5 +339,11 @@ module_init(init_ramfs_fs) module_exit(exit_ramfs_fs) + +int __init init_rootfs(void) +{ + return register_filesystem(&rootfs_fs_type); +} + MODULE_LICENSE("GPL"); diff -urN linux-2.5.2-pre1/fs/romfs/inode.c linux/fs/romfs/inode.c --- linux-2.5.2-pre1/fs/romfs/inode.c Sun Dec 16 12:23:05 2001 +++ linux/fs/romfs/inode.c Tue Dec 25 16:50:14 2001 @@ -102,9 +102,7 @@ /* I would parse the options here, but there are none.. :) */ - set_blocksize(dev, ROMBSIZE); - s->s_blocksize = ROMBSIZE; - s->s_blocksize_bits = ROMBSBITS; + sb_set_blocksize(s, ROMBSIZE); s->u.generic_sbp = (void *) 0; s->s_maxbytes = 0xFFFFFFFF; diff -urN linux-2.5.2-pre1/fs/sysv/super.c linux/fs/sysv/super.c --- linux-2.5.2-pre1/fs/sysv/super.c Sun Dec 16 12:23:05 2001 +++ linux/fs/sysv/super.c Tue Dec 25 16:50:14 2001 @@ -315,8 +315,6 @@ sb->sv_ninodes = (sb->sv_firstdatazone - sb->sv_firstinodezone) << sb->sv_inodes_per_block_bits; - sb->s_blocksize = bsize; - sb->s_blocksize_bits = n_bits; if (!silent) printk("VFS: Found a %s FS (block size = %ld) on device %s\n", found, sb->s_blocksize, bdevname(sb->s_dev)); @@ -361,8 +359,7 @@ panic("Coherent FS: bad super-block size"); if (64 != sizeof (struct sysv_inode)) panic("sysv fs: bad i-node size"); - set_blocksize(dev,BLOCK_SIZE); - sb->s_blocksize = BLOCK_SIZE; + sb_set_blocksize(sb, BLOCK_SIZE); sb->sv_block_base = 0; for (i = 0; i < sizeof(flavours)/sizeof(flavours[0]) && !size; i++) { @@ -380,8 +377,7 @@ case 1: blocknr = bh->b_blocknr << 1; brelse(bh); - set_blocksize(dev, 512); - sb->s_blocksize = 512; + sb_set_blocksize(sb, 512); bh1 = sb_bread(sb, blocknr); bh = sb_bread(sb, blocknr + 1); break; @@ -391,8 +387,7 @@ case 3: blocknr = bh->b_blocknr >> 1; brelse(bh); - set_blocksize(dev, 2048); - sb->s_blocksize = 2048; + sb_set_blocksize(sb, 2048); bh1 = bh = sb_bread(sb, blocknr); break; default: @@ -408,7 +403,7 @@ brelse(bh1); brelse(bh); - set_blocksize(sb->s_dev,BLOCK_SIZE); + sb_set_blocksize(sb, BLOCK_SIZE); printk("oldfs: cannot read superblock\n"); failed: return NULL; @@ -443,8 +438,7 @@ sb->sv_type = FSTYPE_V7; sb->sv_bytesex = BYTESEX_PDP; - set_blocksize(dev, 512); - sb->s_blocksize = 512; + sb_set_blocksize(sb, 512); if ((bh = sb_bread(sb, 1)) == NULL) { if (!silent) diff -urN linux-2.5.2-pre1/fs/udf/super.c linux/fs/udf/super.c --- linux-2.5.2-pre1/fs/udf/super.c Sun Dec 16 12:23:05 2001 +++ linux/fs/udf/super.c Tue Dec 25 16:50:14 2001 @@ -357,30 +357,11 @@ static int udf_set_blocksize(struct super_block *sb, int bsize) { - /* Use specified block size if specified */ - if (bsize) - sb->s_blocksize = bsize; - if (get_hardsect_size(sb->s_dev) > sb->s_blocksize) - sb->s_blocksize = get_hardsect_size(sb->s_dev); - - /* Block size must be an even multiple of 512 */ - switch (sb->s_blocksize) - { - case 512: sb->s_blocksize_bits = 9; break; - case 1024: sb->s_blocksize_bits = 10; break; - case 2048: sb->s_blocksize_bits = 11; break; - case 4096: sb->s_blocksize_bits = 12; break; - case 8192: sb->s_blocksize_bits = 13; break; - default: - { - udf_debug("Bad block size (%ld)\n", sb->s_blocksize); - printk(KERN_ERR "udf: bad block size (%ld)\n", sb->s_blocksize); - return 0; - } + if (!sb_min_blocksize(sb, bsize)) { + udf_debug("Bad block size (%d)\n", bsize); + printk(KERN_ERR "udf: bad block size (%d)\n", bsize); + return 0; } - - /* Set the block size */ - set_blocksize(sb->s_dev, sb->s_blocksize); return sb->s_blocksize; } diff -urN linux-2.5.2-pre1/fs/ufs/super.c linux/fs/ufs/super.c --- linux-2.5.2-pre1/fs/ufs/super.c Sun Dec 16 12:23:05 2001 +++ linux/fs/ufs/super.c Tue Dec 25 16:50:14 2001 @@ -596,8 +596,7 @@ } again: - set_blocksize (sb->s_dev, block_size); - sb->s_blocksize = block_size; + sb_set_blocksize(sb, block_size); /* * read ufs super block from device @@ -716,8 +715,6 @@ /* * Read ufs_super_block into internal data structures */ - sb->s_blocksize = fs32_to_cpu(sb, usb1->fs_fsize); - sb->s_blocksize_bits = fs32_to_cpu(sb, usb1->fs_fshift); sb->s_op = &ufs_super_ops; sb->dq_op = NULL; /***/ sb->s_magic = fs32_to_cpu(sb, usb3->fs_magic); diff -urN linux-2.5.2-pre1/include/asm-sparc/keyboard.h linux/include/asm-sparc/keyboard.h --- linux-2.5.2-pre1/include/asm-sparc/keyboard.h Tue Aug 28 07:09:44 2001 +++ linux/include/asm-sparc/keyboard.h Tue Dec 25 16:50:14 2001 @@ -40,7 +40,6 @@ #define kbd_init pcikbd_init #define compute_shiftstate pci_compute_shiftstate -#define keyboard_wait_for_keypress pci_wait_for_keypress #define getkeycode pci_getkeycode #define setkeycode pci_setkeycode #define getledstate pci_getledstate diff -urN linux-2.5.2-pre1/include/asm-sparc64/keyboard.h linux/include/asm-sparc64/keyboard.h --- linux-2.5.2-pre1/include/asm-sparc64/keyboard.h Tue Aug 28 07:09:44 2001 +++ linux/include/asm-sparc64/keyboard.h Tue Dec 25 16:50:14 2001 @@ -38,7 +38,6 @@ #define kbd_init pcikbd_init #define compute_shiftstate pci_compute_shiftstate -#define keyboard_wait_for_keypress pci_wait_for_keypress #define getkeycode pci_getkeycode #define setkeycode pci_setkeycode #define getledstate pci_getledstate diff -urN linux-2.5.2-pre1/include/linux/amigaffs.h linux/include/linux/amigaffs.h --- linux-2.5.2-pre1/include/linux/amigaffs.h Sun Dec 16 12:23:05 2001 +++ linux/include/linux/amigaffs.h Tue Dec 25 16:50:14 2001 @@ -23,8 +23,7 @@ static inline void affs_set_blocksize(struct super_block *sb, int size) { - set_blocksize(sb->s_dev, size); - sb->s_blocksize = size; + sb_set_blocksize(sb, size); } static inline struct buffer_head * affs_bread(struct super_block *sb, int block) diff -urN linux-2.5.2-pre1/include/linux/console.h linux/include/linux/console.h --- linux-2.5.2-pre1/include/linux/console.h Sun Dec 16 15:43:25 2001 +++ linux/include/linux/console.h Tue Dec 25 16:50:14 2001 @@ -97,7 +97,6 @@ void (*write)(struct console *, const char *, unsigned); int (*read)(struct console *, const char *, unsigned); kdev_t (*device)(struct console *); - int (*wait_key)(struct console *); void (*unblank)(void); int (*setup)(struct console *, char *); short flags; diff -urN linux-2.5.2-pre1/include/linux/devfs_fs_kernel.h linux/include/linux/devfs_fs_kernel.h --- linux-2.5.2-pre1/include/linux/devfs_fs_kernel.h Sun Dec 16 15:43:25 2001 +++ linux/include/linux/devfs_fs_kernel.h Tue Dec 25 16:50:14 2001 @@ -112,7 +112,6 @@ int number); extern void mount_devfs_fs (void); -extern void devfs_make_root (const char *name); #else /* CONFIG_DEVFS_FS */ @@ -288,10 +287,6 @@ } static inline void mount_devfs_fs (void) -{ - return; -} -static inline void devfs_make_root (const char *name) { return; } diff -urN linux-2.5.2-pre1/include/linux/fs.h linux/include/linux/fs.h --- linux-2.5.2-pre1/include/linux/fs.h Sun Dec 16 15:43:25 2001 +++ linux/include/linux/fs.h Tue Dec 25 16:50:14 2001 @@ -982,6 +982,7 @@ extern struct vfsmount *kern_mount(struct file_system_type *); extern int may_umount(struct vfsmount *); extern long do_mount(char *, char *, char *, unsigned long, void *); +extern void umount_tree(struct vfsmount *); #define kern_umount mntput @@ -1378,6 +1379,8 @@ __bforget(buf); } extern int set_blocksize(kdev_t, int); +extern int sb_set_blocksize(struct super_block *, int); +extern int sb_min_blocksize(struct super_block *, int); extern struct buffer_head * bread(kdev_t, int, int); static inline struct buffer_head * sb_bread(struct super_block *sb, int block) { diff -urN linux-2.5.2-pre1/include/linux/kbd_kern.h linux/include/linux/kbd_kern.h --- linux-2.5.2-pre1/include/linux/kbd_kern.h Sun Dec 16 15:44:43 2001 +++ linux/include/linux/kbd_kern.h Tue Dec 25 16:50:14 2001 @@ -140,7 +140,6 @@ int getkeycode(unsigned int scancode); int setkeycode(unsigned int scancode, unsigned int keycode); void compute_shiftstate(void); -int keyboard_wait_for_keypress(struct console *); /* defkeymap.c */ diff -urN linux-2.5.2-pre1/include/linux/keyboard.h linux/include/linux/keyboard.h --- linux-2.5.2-pre1/include/linux/keyboard.h Sun Dec 16 15:44:28 2001 +++ linux/include/linux/keyboard.h Tue Dec 25 16:50:14 2001 @@ -26,7 +26,6 @@ extern const int max_vals[]; extern unsigned short *key_maps[MAX_NR_KEYMAPS]; extern unsigned short plain_map[NR_KEYS]; -extern wait_queue_head_t keypress_wait; extern unsigned char keyboard_type; #endif diff -urN linux-2.5.2-pre1/include/linux/namespace.h linux/include/linux/namespace.h --- linux-2.5.2-pre1/include/linux/namespace.h Wed Dec 31 16:00:00 1969 +++ linux/include/linux/namespace.h Tue Dec 25 16:50:14 2001 @@ -0,0 +1,42 @@ +#ifndef _NAMESPACE_H_ +#define _NAMESPACE_H_ +#ifdef __KERNEL__ + +struct namespace { + atomic_t count; + struct vfsmount * root; + struct list_head list; + struct rw_semaphore sem; +}; + +static inline void put_namespace(struct namespace *namespace) +{ + if (atomic_dec_and_test(&namespace->count)) { + down_write(&namespace->sem); + spin_lock(&dcache_lock); + umount_tree(namespace->root); + spin_unlock(&dcache_lock); + up_write(&namespace->sem); + kfree(namespace); + } +} + +static inline void exit_namespace(struct task_struct *p) +{ + struct namespace *namespace = p->namespace; + if (namespace) { + task_lock(p); + p->namespace = NULL; + task_unlock(p); + put_namespace(namespace); + } +} +extern int copy_namespace(int, struct task_struct *); + +static inline void get_namespace(struct namespace *namespace) +{ + atomic_inc(&namespace->count); +} + +#endif +#endif diff -urN linux-2.5.2-pre1/include/linux/sched.h linux/include/linux/sched.h --- linux-2.5.2-pre1/include/linux/sched.h Sun Dec 16 15:43:25 2001 +++ linux/include/linux/sched.h Tue Dec 25 16:50:14 2001 @@ -41,6 +41,7 @@ #define CLONE_VFORK 0x00004000 /* set if the parent wants the child to wake it up on mm_release */ #define CLONE_PARENT 0x00008000 /* set if we want to have the same parent as the cloner */ #define CLONE_THREAD 0x00010000 /* Same thread group? */ +#define CLONE_NEWNS 0x00020000 /* New namespace group? */ #define CLONE_SIGNAL (CLONE_SIGHAND | CLONE_THREAD) @@ -165,6 +166,7 @@ */ #define NR_OPEN_DEFAULT BITS_PER_LONG +struct namespace; /* * Open file table structure */ @@ -388,6 +390,8 @@ struct fs_struct *fs; /* open file information */ struct files_struct *files; +/* namespace */ + struct namespace *namespace; /* signal handlers */ spinlock_t sigmask_lock; /* Protects signal and blocked */ struct signal_struct *sig; diff -urN linux-2.5.2-pre1/init/do_mounts.c linux/init/do_mounts.c --- linux-2.5.2-pre1/init/do_mounts.c Tue Dec 25 16:50:12 2001 +++ linux/init/do_mounts.c Tue Dec 25 16:50:14 2001 @@ -6,6 +6,7 @@ #include #include #include +#include #include #include @@ -17,7 +18,6 @@ #define BUILD_CRAMDISK extern int get_filesystem_list(char * buf); -extern void wait_for_keypress(void); asmlinkage long sys_mount(char *dev_name, char *dir_name, char *type, unsigned long flags, void *data); @@ -363,8 +363,9 @@ static void __init change_floppy(char *fmt, ...) { - extern void wait_for_keypress(void); + struct termios termios; char buf[80]; + char c; int fd; va_list args; va_start(args, fmt); @@ -376,7 +377,16 @@ close(fd); } printk(KERN_NOTICE "VFS: Insert %s and press ENTER\n", buf); - wait_for_keypress(); + fd = open("/dev/console", O_RDWR, 0); + if (fd >= 0) { + sys_ioctl(fd, TCGETS, (long)&termios); + termios.c_lflag &= ~ICANON; + sys_ioctl(fd, TCSETSF, (long)&termios); + read(fd, &c, 1); + termios.c_lflag |= ICANON; + sys_ioctl(fd, TCSETSF, (long)&termios); + close(fd); + } } #ifdef CONFIG_BLK_DEV_RAM @@ -623,6 +633,63 @@ return rd_load_image("/dev/root"); } +#ifdef CONFIG_DEVFS_FS + +static void __init convert_name(char *prefix, char *name, char *p, int part) +{ + int host, bus, target, lun; + char dest[64]; + char src[64]; + char *base = p - 1; + + /* Decode "c#b#t#u#" */ + if (*p++ != 'c') + return; + host = simple_strtol(p, &p, 10); + if (*p++ != 'b') + return; + bus = simple_strtol(p, &p, 10); + if (*p++ != 't') + return; + target = simple_strtol(p, &p, 10); + if (*p++ != 'u') + return; + lun = simple_strtol(p, &p, 10); + if (!part) + sprintf(dest, "%s/host%d/bus%d/target%d/lun%d", + prefix, host, bus, target, lun); + else if (*p++ == 'p') + sprintf(dest, "%s/host%d/bus%d/target%d/lun%d/part%s", + prefix, host, bus, target, lun, p); + else + sprintf(dest, "%s/host%d/bus%d/target%d/lun%d/disc", + prefix, host, bus, target, lun); + *base = '\0'; + sprintf(src, "/dev/%s", name); + sys_mkdir(src, 0755); + *base = '/'; + sprintf(src, "/dev/%s", name); + sys_symlink(dest, src); +} + +static void __init devfs_make_root(char *name) +{ + + if (!strncmp(name, "sd/", 3)) + convert_name("../scsi", name, name+3, 1); + else if (!strncmp(name, "sr/", 3)) + convert_name("../scsi", name, name+3, 0); + else if (!strncmp(name, "ide/hd/", 7)) + convert_name("..", name, name + 7, 1); + else if (!strncmp(name, "ide/cd/", 7)) + convert_name("..", name, name + 7, 0); +} +#else +static void __init devfs_make_root(char *name) +{ +} +#endif + static void __init mount_root(void) { #ifdef CONFIG_ROOT_NFS @@ -750,6 +817,7 @@ #endif sys_mkdir("/dev", 0700); sys_mkdir("/root", 0700); + sys_mknod("/dev/console", S_IFCHR|0600, MKDEV(TTYAUX_MAJOR, 1)); #ifdef CONFIG_DEVFS_FS sys_mount("devfs", "/dev", "devfs", 0, NULL); do_devfs = 1; diff -urN linux-2.5.2-pre1/kernel/exit.c linux/kernel/exit.c --- linux-2.5.2-pre1/kernel/exit.c Fri Nov 30 10:02:34 2001 +++ linux/kernel/exit.c Tue Dec 25 16:50:14 2001 @@ -12,6 +12,7 @@ #include #include #include +#include #ifdef CONFIG_BSD_PROCESS_ACCT #include #endif @@ -452,6 +453,7 @@ sem_exit(); __exit_files(tsk); __exit_fs(tsk); + exit_namespace(tsk); exit_sighand(tsk); exit_thread(); diff -urN linux-2.5.2-pre1/kernel/fork.c linux/kernel/fork.c --- linux-2.5.2-pre1/kernel/fork.c Fri Nov 30 15:53:28 2001 +++ linux/kernel/fork.c Tue Dec 25 16:50:14 2001 @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -566,6 +567,9 @@ struct task_struct *p; struct completion vfork; + if ((clone_flags & (CLONE_NEWNS|CLONE_FS)) == (CLONE_NEWNS|CLONE_FS)) + return -EINVAL; + retval = -EPERM; /* @@ -661,9 +665,11 @@ goto bad_fork_cleanup_fs; if (copy_mm(clone_flags, p)) goto bad_fork_cleanup_sighand; + if (copy_namespace(clone_flags, p)) + goto bad_fork_cleanup_mm; retval = copy_thread(0, clone_flags, stack_start, stack_size, p, regs); if (retval) - goto bad_fork_cleanup_mm; + goto bad_fork_cleanup_namespace; p->semundo = NULL; /* Our parent execution domain becomes current domain @@ -730,6 +736,8 @@ fork_out: return retval; +bad_fork_cleanup_namespace: + exit_namespace(p); bad_fork_cleanup_mm: exit_mm(p); bad_fork_cleanup_sighand: diff -urN linux-2.5.2-pre1/kernel/kmod.c linux/kernel/kmod.c --- linux-2.5.2-pre1/kernel/kmod.c Tue Jul 17 18:23:50 2001 +++ linux/kernel/kmod.c Tue Dec 25 16:50:14 2001 @@ -24,6 +24,8 @@ #include #include #include +#include +#include #include #include @@ -36,6 +38,7 @@ struct fs_struct *our_fs, *init_fs; struct dentry *root, *pwd; struct vfsmount *rootmnt, *pwdmnt; + struct namespace *our_ns, *init_ns; /* * Make modprobe's fs context be a copy of init's. @@ -55,6 +58,11 @@ */ init_fs = init_task.fs; + init_ns = init_task.namespace; + get_namespace(init_ns); + our_ns = current->namespace; + current->namespace = init_ns; + put_namespace(our_ns); read_lock(&init_fs->lock); rootmnt = mntget(init_fs->rootmnt); root = dget(init_fs->root); diff -urN linux-2.5.2-pre1/kernel/ksyms.c linux/kernel/ksyms.c --- linux-2.5.2-pre1/kernel/ksyms.c Tue Dec 25 16:50:12 2001 +++ linux/kernel/ksyms.c Tue Dec 25 16:50:14 2001 @@ -188,6 +188,8 @@ EXPORT_SYMBOL(write_inode_now); EXPORT_SYMBOL(notify_change); EXPORT_SYMBOL(set_blocksize); +EXPORT_SYMBOL(sb_set_blocksize); +EXPORT_SYMBOL(sb_min_blocksize); EXPORT_SYMBOL(getblk); EXPORT_SYMBOL(cdget); EXPORT_SYMBOL(cdput);