@@ -2763,13 +2763,6 @@ static int reiserfs_write_begin(struct file *file,
2763
2763
int old_ref = 0 ;
2764
2764
2765
2765
inode = mapping -> host ;
2766
- * fsdata = NULL ;
2767
- if (flags & AOP_FLAG_CONT_EXPAND &&
2768
- (pos & (inode -> i_sb -> s_blocksize - 1 )) == 0 ) {
2769
- pos ++ ;
2770
- * fsdata = (void * )(unsigned long )flags ;
2771
- }
2772
-
2773
2766
index = pos >> PAGE_SHIFT ;
2774
2767
page = grab_cache_page_write_begin (mapping , index , flags );
2775
2768
if (!page )
@@ -2896,9 +2889,6 @@ static int reiserfs_write_end(struct file *file, struct address_space *mapping,
2896
2889
unsigned start ;
2897
2890
bool locked = false;
2898
2891
2899
- if ((unsigned long )fsdata & AOP_FLAG_CONT_EXPAND )
2900
- pos ++ ;
2901
-
2902
2892
reiserfs_wait_on_write_block (inode -> i_sb );
2903
2893
if (reiserfs_transaction_running (inode -> i_sb ))
2904
2894
th = current -> journal_info ;
@@ -3316,7 +3306,11 @@ int reiserfs_setattr(struct user_namespace *mnt_userns, struct dentry *dentry,
3316
3306
3317
3307
/* fill in hole pointers in the expanding truncate case. */
3318
3308
if (attr -> ia_size > inode -> i_size ) {
3319
- error = generic_cont_expand_simple (inode , attr -> ia_size );
3309
+ loff_t pos = attr -> ia_size ;
3310
+
3311
+ if ((pos & (inode -> i_sb -> s_blocksize - 1 )) == 0 )
3312
+ pos ++ ;
3313
+ error = generic_cont_expand_simple (inode , pos );
3320
3314
if (REISERFS_I (inode )-> i_prealloc_count > 0 ) {
3321
3315
int err ;
3322
3316
struct reiserfs_transaction_handle th ;
0 commit comments