diff options
| author | Alex Shi <alex.shi@linaro.org> | 2016-10-24 12:30:04 +0800 |
|---|---|---|
| committer | Alex Shi <alex.shi@linaro.org> | 2016-10-24 12:30:04 +0800 |
| commit | 59628a48e83c96ae3d6426391d93281e53c48462 (patch) | |
| tree | 0b26c31bc01dea9bf476e8baf68e98782db45e7e /fs/ext4/inode.c | |
| parent | 1a88e2aad5d0633e5c316af1d50c27aa0b22155d (diff) | |
| parent | 3afd8362fabd167bb04f79501f21dd67aa9cb99f (diff) | |
Merge tag 'v4.4.27' into linux-linaro-lsk-v4.4
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 28702932a908..c71d2941a45b 100644 --- a/fs/ext4/inode.c +++ b/fs/ext4/inode.c @@ -3645,7 +3645,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 @@ -3674,7 +3674,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) @@ -4549,14 +4549,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)); |
