|
|
1.1 ! root 1: --- linux/fs/fat/file.c.orig Thu Jan 7 18:38:59 1999 ! 2: +++ linux/fs/fat/file.c Thu Jan 7 19:17:40 1999 ! 3: @@ -442,6 +442,10 @@ ! 4: /* Why no return value? Surely the disk could fail... */ ! 5: if (IS_IMMUTABLE(inode)) ! 6: return /* -EPERM */; ! 7: + if(inode->i_sb->s_flags&MS_RDONLY) { ! 8: + printk("FAT: fat_truncate called though fs is read-only, uhh...\n"); ! 9: + return /* -EROFS */; ! 10: + } ! 11: cluster = SECTOR_SIZE*MSDOS_SB(inode->i_sb)->cluster_size; ! 12: (void) fat_free(inode,(inode->i_size+(cluster-1))/cluster); ! 13: MSDOS_I(inode)->i_attrs |= ATTR_ARCH;
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.