|
@@ -4814,14 +4814,14 @@ static int ext4_do_update_inode(handle_t *handle,
|
|
* Fix up interoperability with old kernels. Otherwise, old inodes get
|
|
* Fix up interoperability with old kernels. Otherwise, old inodes get
|
|
* re-used with the upper 16 bits of the uid/gid intact
|
|
* re-used with the upper 16 bits of the uid/gid intact
|
|
*/
|
|
*/
|
|
- if (!ei->i_dtime) {
|
|
|
|
|
|
+ if (ei->i_dtime && list_empty(&ei->i_orphan)) {
|
|
|
|
+ raw_inode->i_uid_high = 0;
|
|
|
|
+ raw_inode->i_gid_high = 0;
|
|
|
|
+ } else {
|
|
raw_inode->i_uid_high =
|
|
raw_inode->i_uid_high =
|
|
cpu_to_le16(high_16_bits(i_uid));
|
|
cpu_to_le16(high_16_bits(i_uid));
|
|
raw_inode->i_gid_high =
|
|
raw_inode->i_gid_high =
|
|
cpu_to_le16(high_16_bits(i_gid));
|
|
cpu_to_le16(high_16_bits(i_gid));
|
|
- } else {
|
|
|
|
- raw_inode->i_uid_high = 0;
|
|
|
|
- raw_inode->i_gid_high = 0;
|
|
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
raw_inode->i_uid_low = cpu_to_le16(fs_high2lowuid(i_uid));
|
|
raw_inode->i_uid_low = cpu_to_le16(fs_high2lowuid(i_uid));
|