patch-1.3.48 linux/fs/msdos/file.c
Next file: linux/fs/msdos/inode.c
Previous file: linux/fs/inode.c
Back to the patch index
Back to the overall index
- Lines: 22
- Date:
Sun Dec 17 11:02:41 1995
- Orig file:
v1.3.47/linux/fs/msdos/file.c
- Orig date:
Sat Nov 11 17:41:33 1995
diff -u --recursive --new-file v1.3.47/linux/fs/msdos/file.c linux/fs/msdos/file.c
@@ -283,8 +283,8 @@
printk("msdos_file_write: mode = %07o\n",inode->i_mode);
return -EINVAL;
}
- /* Must not harm system files */
- if (MSDOS_I(inode)->i_attrs & ATTR_SYS) return -EPERM;
+ /* system files are immutable */
+ if (IS_IMMUTABLE(inode)) return -EPERM;
/*
* ok, append may not work when many processes are writing at the same time
* but so what. That way leads to madness anyway.
@@ -362,9 +362,8 @@
{
int cluster;
- /* Must not harm system files */
/* Why no return value? Surely the disk could fail... */
- if (MSDOS_I(inode)->i_attrs & ATTR_SYS) return /* -EPERM */;
+ if (IS_IMMUTABLE(inode)) return /* -EPERM */;
cluster = SECTOR_SIZE*MSDOS_SB(inode->i_sb)->cluster_size;
(void) fat_free(inode,(inode->i_size+(cluster-1))/cluster);
MSDOS_I(inode)->i_attrs |= ATTR_ARCH;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this