patch-2.1.94 linux/fs/ext2/file.c
Next file: linux/fs/sysv/inode.c
Previous file: linux/fs/devpts/root.c
Back to the patch index
Back to the overall index
- Lines: 38
- Date:
Wed Apr 8 11:36:53 1998
- Orig file:
v2.1.93/linux/fs/ext2/file.c
- Orig date:
Mon Apr 6 17:41:00 1998
diff -u --recursive --new-file v2.1.93/linux/fs/ext2/file.c linux/fs/ext2/file.c
@@ -205,21 +205,23 @@
return -EFBIG;
}
#else
- off_t max = ext2_max_sizes[EXT2_BLOCK_SIZE_BITS(sb)];
+ {
+ off_t max = ext2_max_sizes[EXT2_BLOCK_SIZE_BITS(sb)];
- if (pos + count > max) {
- count = max - pos;
- if (!count)
- return -EFBIG;
- }
- if (((pos + count) >> 32) &&
- !(sb->u.ext2_sb.s_es->s_feature_ro_compat &
- cpu_to_le32(EXT2_FEATURE_RO_COMPAT_LARGE_FILE))) {
- /* If this is the first large file created, add a flag
- to the superblock */
- sb->u.ext2_sb.s_es->s_feature_ro_compat |=
- cpu_to_le32(EXT2_FEATURE_RO_COMPAT_LARGE_FILE);
- mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1);
+ if (pos + count > max) {
+ count = max - pos;
+ if (!count)
+ return -EFBIG;
+ }
+ if (((pos + count) >> 32) &&
+ !(sb->u.ext2_sb.s_es->s_feature_ro_compat &
+ cpu_to_le32(EXT2_FEATURE_RO_COMPAT_LARGE_FILE))) {
+ /* If this is the first large file created, add a flag
+ to the superblock */
+ sb->u.ext2_sb.s_es->s_feature_ro_compat |=
+ cpu_to_le32(EXT2_FEATURE_RO_COMPAT_LARGE_FILE);
+ mark_buffer_dirty(sb->u.ext2_sb.s_sbh, 1);
+ }
}
#endif
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov