patch-2.2.2 linux/arch/alpha/kernel/osf_sys.c

Next file: linux/arch/alpha/kernel/proto.h
Previous file: linux/arch/alpha/kernel/entry.S
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.2.1/linux/arch/alpha/kernel/osf_sys.c linux/arch/alpha/kernel/osf_sys.c
@@ -317,8 +317,8 @@
 	struct super_block * sb = inode->i_sb;
 	int error;
 
-	error = -ENOSYS;
-	if (sb->s_op->statfs) {
+	error = -ENODEV;
+	if (sb && sb->s_op && sb->s_op->statfs) {
 		set_fs(KERNEL_DS);
 		error = sb->s_op->statfs(sb, &linux_stat, sizeof(linux_stat));
 		set_fs(USER_DS);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)