Orangefs: use inode_set_bytes for directories

Signed-off-by: Mike Marshall <hubcap@omnibond.com>
This commit is contained in:
Mike Marshall 2015-08-05 13:46:28 -04:00
parent c36316b74e
commit f0566532fe
1 changed files with 4 additions and 5 deletions

View File

@ -162,12 +162,11 @@ static int copy_attributes_to_inode(struct inode *inode,
}
/*FALLTHRU*/
default:
pvfs2_lock_inode(inode);
inode->i_bytes = (unsigned short)PAGE_CACHE_SIZE;
inode->i_blocks = (unsigned long)(PAGE_CACHE_SIZE / 512);
pvfs2_unlock_inode(inode);
inode->i_size = PAGE_CACHE_SIZE;
pvfs2_lock_inode(inode);
inode_set_bytes(inode, inode->i_size);
pvfs2_unlock_inode(inode);
break;
}