Skip to content

Commit

Permalink
exofs: Set i_mapping->backing_dev_info anyway
Browse files Browse the repository at this point in the history
Though it has been promised that inode->i_mapping->backing_dev_info
is not used and the supporting code is fine. Until the pointer
will default to NULL, I'd rather it points to the correct thing
regardless.

At least for future infrastructure coder it is a clear indication
of where are the key points that inodes are initialized.
I know because it took me time to find this out.

Signed-off-by: Boaz Harrosh <Boaz Harrosh [email protected]>
  • Loading branch information
Boaz Harrosh authored and Boaz Harrosh committed Oct 18, 2010
1 parent 7aebf41 commit 115e19c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/exofs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1030,6 +1030,7 @@ struct inode *exofs_iget(struct super_block *sb, unsigned long ino)
memcpy(oi->i_data, fcb.i_data, sizeof(fcb.i_data));
}

inode->i_mapping->backing_dev_info = sb->s_bdi;
if (S_ISREG(inode->i_mode)) {
inode->i_op = &exofs_file_inode_operations;
inode->i_fop = &exofs_file_operations;
Expand Down Expand Up @@ -1129,6 +1130,7 @@ struct inode *exofs_new_inode(struct inode *dir, int mode)

sbi = sb->s_fs_info;

inode->i_mapping->backing_dev_info = sb->s_bdi;
sb->s_dirt = 1;
inode_init_owner(inode, dir, mode);
inode->i_ino = sbi->s_nextid++;
Expand Down

0 comments on commit 115e19c

Please sign in to comment.