Skip to content

Commit 4dea9cd

Browse files
fs/ntfs3: Add file_modified
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
1 parent a40b73f commit 4dea9cd

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

fs/ntfs3/file.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -632,11 +632,17 @@ static long ntfs_fallocate(struct file *file, int mode, loff_t vbo, loff_t len)
632632
&ni->file.run, i_size, &ni->i_valid,
633633
true, NULL);
634634
ni_unlock(ni);
635+
if (err)
636+
goto out;
635637
} else if (new_size > i_size) {
636638
inode->i_size = new_size;
637639
}
638640
}
639641

642+
err = file_modified(file);
643+
if (err)
644+
goto out;
645+
640646
out:
641647
if (map_locked)
642648
filemap_invalidate_unlock(mapping);
@@ -1040,6 +1046,7 @@ static ssize_t ntfs_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
10401046
struct address_space *mapping = file->f_mapping;
10411047
struct inode *inode = mapping->host;
10421048
ssize_t ret;
1049+
int err;
10431050
struct ntfs_inode *ni = ntfs_i(inode);
10441051

10451052
if (is_encrypted(ni)) {
@@ -1067,6 +1074,12 @@ static ssize_t ntfs_file_write_iter(struct kiocb *iocb, struct iov_iter *from)
10671074
if (ret <= 0)
10681075
goto out;
10691076

1077+
err = file_modified(iocb->ki_filp);
1078+
if (err) {
1079+
ret = err;
1080+
goto out;
1081+
}
1082+
10701083
if (WARN_ON(ni->ni_flags & NI_FLAG_COMPRESSED_MASK)) {
10711084
/* Should never be here, see ntfs_file_open(). */
10721085
ret = -EOPNOTSUPP;

0 commit comments

Comments
 (0)