diff -rbB linux-2.6.20-namesys/fs/reiser4/as_ops.c linux-2.6.20-riffard/fs/reiser4/as_ops.c 286a287,288 > if (page_count(page) > 3) > return 0; diff -rbB linux-2.6.20-namesys/fs/reiser4/entd.c linux-2.6.20-riffard/fs/reiser4/entd.c 243c243 < rq->wbc->range_end = LLONG_MAX; --- > rq->wbc->range_end = 0; diff -rbB linux-2.6.20-namesys/fs/reiser4/estimate.c linux-2.6.20-riffard/fs/reiser4/estimate.c 96c96,105 < /* how many nodes occupied by a disk cluster might get dirty */ --- > /* How many nodes occupied by a disk cluster might get dirty. > Note that this estimation is not precise (i.e. disk cluster > can occupy more nodes). > Q: Why we don't use precise estimation? > A: 1.Because precise estimation is fairly bad: 65536 nodes > for 64K logical cluster, it means 256M of dead space on > a partition > 2.It is a very rare case when disk cluster occupies more > nodes then this estimation returns. > */ diff -rbB linux-2.6.20-namesys/fs/reiser4/jnode.c linux-2.6.20-riffard/fs/reiser4/jnode.c 1005,1006d1004 < /* release reference acquired in jload_gfp() or jinit_new() */ < jput(node); 1008a1007,1008 > /* release reference acquired in jload_gfp() or jinit_new() */ > jput(node); diff -rbB linux-2.6.20-namesys/fs/reiser4/page_cache.c linux-2.6.20-riffard/fs/reiser4/page_cache.c 412c412 < SetPageWriteback(page); --- > set_page_writeback(page); diff -rbB linux-2.6.20-namesys/fs/reiser4/plugin/file/file.c linux-2.6.20-riffard/fs/reiser4/plugin/file/file.c 31,46d30 < /* Get exclusive access and make sure that file is not partially < * converted (It may happen that another process is doing tail < * conversion. If so, wait until it completes) < */ < static inline void get_exclusive_access_careful(unix_file_info_t * uf_info, < struct inode *inode) < { < do { < get_exclusive_access(uf_info); < if (!reiser4_inode_get_flag(inode, REISER4_PART_IN_CONV)) < break; < drop_exclusive_access(uf_info); < schedule(); < } while (1); < } < 1952c1936 < get_exclusive_access_careful(uf_info, inode); --- > get_exclusive_access(uf_info); 2066a2051 > get_exclusive_access(uf_info); 2068c2053,2065 < get_exclusive_access_careful(uf_info, inode); --- > /* > * it may happen that another process is doing tail conversion. Wait > * until it completes > */ > while (1) { > if (reiser4_inode_get_flag(inode, REISER4_PART_IN_CONV)) { > drop_exclusive_access(uf_info); > schedule(); > get_exclusive_access(uf_info); > continue; > } > break; > } 2175a2173,2174 > /* remove_suid might create a transaction */ > reiser4_txn_restart(ctx); 2369c2368 < get_exclusive_access_careful(uf_info, inode); --- > get_exclusive_access(uf_info); 2678c2677 < get_exclusive_access_careful(uf_info, dentry->d_inode); --- > get_exclusive_access(uf_info); diff -rbB linux-2.6.20-namesys/fs/reiser4/plugin/file/tail_conversion.c linux-2.6.20-riffard/fs/reiser4/plugin/file/tail_conversion.c 471,482c471,479 < * We have to drop exclusive access to avoid deadlock < * which may happen because called by reiser4_writepages < * capture_unix_file requires to get non-exclusive < * access to a file. It is safe to drop EA in the middle < * of tail2extent conversion because write_unix_file, < * setattr_unix_file(truncate), mmap_unix_file, < * release_unix_file(extent2tail) checks if conversion < * is not in progress (see comments before < * get_exclusive_access_careful(). < * Other processes that acquire non-exclusive access < * (read_unix_file, reiser4_writepages, etc) should work < * on partially converted files. --- > * we have to drop exclusive access to avoid deadlock > * which may happen because called by > * reiser4_writepages capture_unix_file requires to get > * non-exclusive access to a file. It is safe to drop > * EA in the middle of tail2extent conversion because > * write_unix_file/unix_setattr(truncate)/release_unix_file(extent2tail) > * are serialized by reiser4_inode->mutex_write semaphore and > * because read_unix_file works (should at least) on > * partially converted files diff -rbB linux-2.6.20-namesys/fs/reiser4/plugin/item/ctail.c linux-2.6.20-riffard/fs/reiser4/plugin/item/ctail.c 1160c1160 < cluster_init_write(&pos->sq->clust, 0); --- > cluster_init_write(&pos->sq->clust, NULL); diff -rbB linux-2.6.20-namesys/fs/reiser4/plugin/item/extent_file_ops.c linux-2.6.20-riffard/fs/reiser4/plugin/item/extent_file_ops.c 944,945c944,945 < * @count: number of bytes to write < * @pos: position in file to write to --- > * @write_amount: number of bytes to write > * @off: position in file to write to 952c952 < int nr_pages, nr_dirty; --- > int nr_pages; 961c961 < int result = 0; --- > int result; 975d974 < left = count; 980d978 < nr_dirty = 0; 988,990c986,990 < nr_pages = i; < result = RETERR(-ENOMEM); < goto out; --- > while(i --) { > unlock_page(jnode_page(jnodes[i])); > page_cache_release(jnode_page(jnodes[i])); > } > return RETERR(-ENOMEM); 997,999c997,1001 < nr_pages = i; < result = RETERR(-ENOMEM); < goto out; --- > while (i --) { > jput(jnodes[i]); > page_cache_release(jnode_page(jnodes[i])); > } > return RETERR(-ENOMEM); 1009a1012 > left = count; 1052,1057d1054 < if (unlikely(written != to_page)) { < unlock_page(page); < result = RETERR(-EFAULT); < break; < } < 1061,1062d1057 < nr_dirty++; < 1064a1060 > page_cache_release(page); 1076c1072 < update_extents(file, jnodes, nr_dirty, *pos); --- > update_extents(file, jnodes, nr_pages, *pos); 1078,1079c1074 < for (i = 0; i < nr_dirty; i ++) { < int ret; --- > for (i = 0; i < nr_pages; i ++) { 1081c1076 < ret = reiser4_try_capture(jnodes[i], --- > result = reiser4_try_capture(jnodes[i], 1083c1078 < BUG_ON(ret != 0); --- > BUG_ON(result != 0); 1088c1083 < out: --- > 1090d1084 < page_cache_release(jnode_page(jnodes[i])); 1095,1098c1089,1090 < /* the only errors handled so far is ENOMEM and < EFAULT on copy_from_user */ < < return (count - left) ? (count - left) : result; --- > /* the only error handled so far is EFAULT on copy_from_user */ > return (count - left) ? (count - left) : -EFAULT; diff -rbB linux-2.6.20-namesys/fs/reiser4/plugin/item/static_stat.c linux-2.6.20-riffard/fs/reiser4/plugin/item/static_stat.c 171d170 < /* common initialisations */ diff -rbB linux-2.6.20-namesys/fs/reiser4/super_ops.c linux-2.6.20-riffard/fs/reiser4/super_ops.c 581,582c581,585 < static int reiser4_get_sb(struct file_system_type *fs_type, int flags, < const char *dev_name, void *data, struct vfsmount *mnt) --- > static int reiser4_get_sb(struct file_system_type *fs_type, > int flags, > const char *dev_name, > void *data, > struct vfsmount *mnt) 599d601 < BUG_ON(*cachep == NULL); diff -rbB linux-2.6.20-namesys/fs/reiser4/wander.c linux-2.6.20-riffard/fs/reiser4/wander.c 560c560 < ClearPageWriteback(pg); --- > end_page_writeback(pg); diff -rbB linux-2.6.20-namesys/mm/filemap.c linux-2.6.20-riffard/mm/filemap.c 469a470 > EXPORT_SYMBOL(add_to_page_cache_lru); 743c744 < EXPORT_SYMBOL(add_to_page_cache_lru); --- > EXPORT_SYMBOL(find_get_pages); 804c805 < EXPORT_SYMBOL(find_get_pages); --- > EXPORT_SYMBOL(find_get_pages_tag); 862d862 < EXPORT_SYMBOL(find_get_pages_tag);