inode.c (d392da5207352f09030e95d9ea335a4225667ec0) inode.c (49521de119d326d04fb3736ab827e12e1de966d0)
1/*
2 * inode.c
3 *
4 * PURPOSE
5 * Inode handling routines for the OSTA-UDF(tm) filesystem.
6 *
7 * COPYRIGHT
8 * This file is distributed under the terms of the GNU General Public

--- 37 unchanged lines hidden (view full) ---

46MODULE_DESCRIPTION("Universal Disk Format Filesystem");
47MODULE_LICENSE("GPL");
48
49#define EXTENT_MERGE_SIZE 5
50
51static mode_t udf_convert_permissions(struct fileEntry *);
52static int udf_update_inode(struct inode *, int);
53static void udf_fill_inode(struct inode *, struct buffer_head *);
1/*
2 * inode.c
3 *
4 * PURPOSE
5 * Inode handling routines for the OSTA-UDF(tm) filesystem.
6 *
7 * COPYRIGHT
8 * This file is distributed under the terms of the GNU General Public

--- 37 unchanged lines hidden (view full) ---

46MODULE_DESCRIPTION("Universal Disk Format Filesystem");
47MODULE_LICENSE("GPL");
48
49#define EXTENT_MERGE_SIZE 5
50
51static mode_t udf_convert_permissions(struct fileEntry *);
52static int udf_update_inode(struct inode *, int);
53static void udf_fill_inode(struct inode *, struct buffer_head *);
54static int udf_sync_inode(struct inode *inode);
54static int udf_alloc_i_data(struct inode *inode, size_t size);
55static struct buffer_head *inode_getblk(struct inode *, sector_t, int *,
56 sector_t *, int *);
57static int8_t udf_insert_aext(struct inode *, struct extent_position,
58 struct kernel_lb_addr, uint32_t);
59static void udf_split_extents(struct inode *, int *, int, int,
60 struct kernel_long_ad[EXTENT_MERGE_SIZE], int *);
61static void udf_prealloc_extents(struct inode *, int, int,

--- 12 unchanged lines hidden (view full) ---

74 int want_delete = 0;
75
76 truncate_inode_pages(&inode->i_data, 0);
77
78 if (!inode->i_nlink && !is_bad_inode(inode)) {
79 want_delete = 1;
80 inode->i_size = 0;
81 udf_truncate(inode);
55static int udf_alloc_i_data(struct inode *inode, size_t size);
56static struct buffer_head *inode_getblk(struct inode *, sector_t, int *,
57 sector_t *, int *);
58static int8_t udf_insert_aext(struct inode *, struct extent_position,
59 struct kernel_lb_addr, uint32_t);
60static void udf_split_extents(struct inode *, int *, int, int,
61 struct kernel_long_ad[EXTENT_MERGE_SIZE], int *);
62static void udf_prealloc_extents(struct inode *, int, int,

--- 12 unchanged lines hidden (view full) ---

75 int want_delete = 0;
76
77 truncate_inode_pages(&inode->i_data, 0);
78
79 if (!inode->i_nlink && !is_bad_inode(inode)) {
80 want_delete = 1;
81 inode->i_size = 0;
82 udf_truncate(inode);
82 lock_kernel();
83 udf_update_inode(inode, IS_SYNC(inode));
83 udf_update_inode(inode, IS_SYNC(inode));
84 unlock_kernel();
85 }
86 invalidate_inode_buffers(inode);
87 end_writeback(inode);
88 if (iinfo->i_alloc_type != ICBTAG_FLAG_AD_IN_ICB &&
89 inode->i_size != iinfo->i_lenExtents) {
90 printk(KERN_WARNING "UDF-fs (%s): Inode %lu (mode %o) has "
91 "inode size %llu different from extent length %llu. "
92 "Filesystem need not be standards compliant.\n",

--- 1275 unchanged lines hidden (view full) ---

1368 ((flags & ICBTAG_FLAG_SETGID) ? S_ISGID : 0) |
1369 ((flags & ICBTAG_FLAG_STICKY) ? S_ISVTX : 0);
1370
1371 return mode;
1372}
1373
1374int udf_write_inode(struct inode *inode, struct writeback_control *wbc)
1375{
84 }
85 invalidate_inode_buffers(inode);
86 end_writeback(inode);
87 if (iinfo->i_alloc_type != ICBTAG_FLAG_AD_IN_ICB &&
88 inode->i_size != iinfo->i_lenExtents) {
89 printk(KERN_WARNING "UDF-fs (%s): Inode %lu (mode %o) has "
90 "inode size %llu different from extent length %llu. "
91 "Filesystem need not be standards compliant.\n",

--- 1275 unchanged lines hidden (view full) ---

1367 ((flags & ICBTAG_FLAG_SETGID) ? S_ISGID : 0) |
1368 ((flags & ICBTAG_FLAG_STICKY) ? S_ISVTX : 0);
1369
1370 return mode;
1371}
1372
1373int udf_write_inode(struct inode *inode, struct writeback_control *wbc)
1374{
1376 int ret;
1377
1378 lock_kernel();
1379 ret = udf_update_inode(inode, wbc->sync_mode == WB_SYNC_ALL);
1380 unlock_kernel();
1381
1382 return ret;
1375 return udf_update_inode(inode, wbc->sync_mode == WB_SYNC_ALL);
1383}
1384
1376}
1377
1385int udf_sync_inode(struct inode *inode)
1378static int udf_sync_inode(struct inode *inode)
1386{
1387 return udf_update_inode(inode, 1);
1388}
1389
1390static int udf_update_inode(struct inode *inode, int do_sync)
1391{
1392 struct buffer_head *bh = NULL;
1393 struct fileEntry *fe;

--- 673 unchanged lines hidden ---
1379{
1380 return udf_update_inode(inode, 1);
1381}
1382
1383static int udf_update_inode(struct inode *inode, int do_sync)
1384{
1385 struct buffer_head *bh = NULL;
1386 struct fileEntry *fe;

--- 673 unchanged lines hidden ---