Import some changes from upstream linux-c6