patch-2.4.0-test3 linux/fs/ntfs/fs.c
Next file: linux/fs/open.c
Previous file: linux/fs/ntfs/Makefile
Back to the patch index
Back to the overall index
- Lines: 61
- Date:
Sat Jul 8 19:26:13 2000
- Orig file:
v2.4.0-test2/linux/fs/ntfs/fs.c
- Orig date:
Fri Jun 23 21:55:10 2000
diff -u --recursive --new-file v2.4.0-test2/linux/fs/ntfs/fs.c linux/fs/ntfs/fs.c
@@ -29,6 +29,7 @@
#include <linux/nls.h>
#include <linux/locks.h>
#include <linux/init.h>
+#include <linux/smp_lock.h>
/* Forward declarations */
static struct inode_operations ntfs_dir_inode_operations;
@@ -80,7 +81,7 @@
io.param=buf;
io.size=count;
error=ntfs_read_attr(ino,ino->vol->at_data,NULL,*off,&io);
- if(error)return -error;
+ if(error && !io.size)return -error;
*off+=io.size;
return io.size;
@@ -546,6 +547,7 @@
}
#endif
+#if 0
static int
ntfs_bmap(struct inode *ino,int block)
{
@@ -554,6 +556,7 @@
ino->i_ino,block,ret);
return (ret==-1) ? 0:ret;
}
+#endif
/* It's fscking broken. */
@@ -707,15 +710,18 @@
#ifdef CONFIG_NTFS_RW
static void
-ntfs_write_inode (struct inode *ino)
+ntfs_write_inode (struct inode *ino, int unused)
{
+ lock_kernel();
ntfs_debug (DEBUG_LINUX, "ntfs:write inode %x\n", ino->i_ino);
ntfs_update_inode (NTFS_LINO2NINO (ino));
+ unlock_kernel();
}
#endif
static void _ntfs_clear_inode(struct inode *ino)
{
+ lock_kernel();
ntfs_debug(DEBUG_OTHER, "ntfs_clear_inode %lx\n",ino->i_ino);
#ifdef NTFS_IN_LINUX_KERNEL
if(ino->i_ino!=FILE_MFT)
@@ -728,6 +734,7 @@
ino->u.generic_ip=0;
}
#endif
+ unlock_kernel();
return;
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)