mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
[PATCH] inode-diet: Eliminate i_blksize from the inode structure
This eliminates the i_blksize field from struct inode. Filesystems that want to provide a per-inode st_blksize can do so by providing their own getattr routine instead of using the generic_fillattr() function. Note that some filesystems were providing pretty much random (and incorrect) values for i_blksize. [[email protected]: cleanup] [[email protected]: generic_fillattr() fix] Signed-off-by: "Theodore Ts'o" <[email protected]> Signed-off-by: Adrian Bunk <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
577c4eb09d
commit
ba52de123d
80 changed files with 21 additions and 125 deletions
|
|
@ -662,7 +662,8 @@ static void do_loop_switch(struct loop_device *lo, struct switch_request *p)
|
|||
|
||||
mapping_set_gfp_mask(old_file->f_mapping, lo->old_gfp_mask);
|
||||
lo->lo_backing_file = file;
|
||||
lo->lo_blocksize = mapping->host->i_blksize;
|
||||
lo->lo_blocksize = S_ISBLK(mapping->host->i_mode) ?
|
||||
mapping->host->i_bdev->bd_block_size : PAGE_SIZE;
|
||||
lo->old_gfp_mask = mapping_gfp_mask(mapping);
|
||||
mapping_set_gfp_mask(mapping, lo->old_gfp_mask & ~(__GFP_IO|__GFP_FS));
|
||||
complete(&p->wait);
|
||||
|
|
@ -794,7 +795,9 @@ static int loop_set_fd(struct loop_device *lo, struct file *lo_file,
|
|||
if (!(lo_flags & LO_FLAGS_USE_AOPS) && !file->f_op->write)
|
||||
lo_flags |= LO_FLAGS_READ_ONLY;
|
||||
|
||||
lo_blocksize = inode->i_blksize;
|
||||
lo_blocksize = S_ISBLK(inode->i_mode) ?
|
||||
inode->i_bdev->bd_block_size : PAGE_SIZE;
|
||||
|
||||
error = 0;
|
||||
} else {
|
||||
goto out_putf;
|
||||
|
|
|
|||
Loading…
Reference in a new issue