patch-2.1.81 linux/fs/fat/file.c
Next file: linux/fs/fat/inode.c
Previous file: linux/fs/fat/dir.c
Back to the patch index
Back to the overall index
- Lines: 34
- Date:
Wed Jan 21 17:46:56 1998
- Orig file:
v2.1.80/linux/fs/fat/file.c
- Orig date:
Thu Jan 8 14:02:41 1998
diff -u --recursive --new-file v2.1.80/linux/fs/fat/file.c linux/fs/fat/file.c
@@ -312,9 +312,10 @@
loff_t *ppos)
{
struct inode *inode = filp->f_dentry->d_inode;
- if(MSDOS_SB(inode->i_sb)->cvf_format)
- if(MSDOS_SB(inode->i_sb)->cvf_format->cvf_file_read)
- return MSDOS_SB(inode->i_sb)->cvf_format->cvf_file_read(filp,buf,count,ppos);
+ if (MSDOS_SB(inode->i_sb)->cvf_format &&
+ MSDOS_SB(inode->i_sb)->cvf_format->cvf_file_read)
+ return MSDOS_SB(inode->i_sb)->cvf_format
+ ->cvf_file_read(filp,buf,count,ppos);
if (!MSDOS_I(inode)->i_binary)
return fat_file_read_text(filp, buf, count, ppos);
@@ -338,13 +339,16 @@
struct buffer_head *bh;
int binary_mode = MSDOS_I(inode)->i_binary;
+ PRINTK(("fat_file_write: dentry=%p, inode=%p, ino=%ld\n",
+ filp->f_dentry, inode, inode->i_ino));
if (!inode) {
printk("fat_file_write: inode = NULL\n");
return -EINVAL;
}
- if(MSDOS_SB(sb)->cvf_format)
- if(MSDOS_SB(sb)->cvf_format->cvf_file_write)
- return MSDOS_SB(sb)->cvf_format->cvf_file_write(filp,buf,count,ppos);
+ if (MSDOS_SB(sb)->cvf_format &&
+ MSDOS_SB(sb)->cvf_format->cvf_file_write)
+ return MSDOS_SB(sb)->cvf_format
+ ->cvf_file_write(filp,buf,count,ppos);
/* S_ISLNK allows for UMSDOS. Should never happen for normal MSDOS */
if (!S_ISREG(inode->i_mode) && !S_ISLNK(inode->i_mode)) {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov