diff options
| author | Dmitry Shmidt <dimitrysh@google.com> | 2016-10-27 10:16:40 -0700 |
|---|---|---|
| committer | Dmitry Shmidt <dimitrysh@google.com> | 2016-10-27 10:16:40 -0700 |
| commit | f8c1167680a1e0755500a0724bde9898a3e18061 (patch) | |
| tree | 02d4ecb84d2ce0bba2e9851768cd5d202e44248f /fs/ext4/inode.c | |
| parent | 59fc70469aed3259e9deda4420031459a4f985c8 (diff) | |
| parent | 3afd8362fabd167bb04f79501f21dd67aa9cb99f (diff) | |
Merge tag 'v4.4.27' into android-4.4.y
This is the 4.4.27 stable release
Diffstat (limited to 'fs/ext4/inode.c')
| -rw-r--r-- | fs/ext4/inode.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c index a152ab604879..a4149cc2c6c0 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -3672,7 +3672,7 @@ int ext4_update_disksize_before_punch(struct inode *inode, loff_t offset, } /* - * ext4_punch_hole: punches a hole in a file by releaseing the blocks + * ext4_punch_hole: punches a hole in a file by releasing the blocks * associated with the given offset and length * * @inode: File inode @@ -3701,7 +3701,7 @@ int ext4_punch_hole(struct inode *inode, loff_t offset, loff_t length) * Write out all dirty pages to avoid race conditions * Then release them. */ - if (mapping->nrpages && mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) { + if (mapping_tagged(mapping, PAGECACHE_TAG_DIRTY)) { ret = filemap_write_and_wait_range(mapping, offset, offset + length - 1); if (ret) @@ -4576,14 +4576,14 @@ static int ext4_do_update_inode(handle_t *handle, * Fix up interoperability with old kernels. Otherwise, old inodes get * 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 = cpu_to_le16(high_16_bits(i_uid)); raw_inode->i_gid_high = cpu_to_le16(high_16_bits(i_gid)); - } else { - raw_inode->i_uid_high = 0; - raw_inode->i_gid_high = 0; } } else { raw_inode->i_uid_low = cpu_to_le16(fs_high2lowuid(i_uid)); |
