Loading fs/ext4/verity.c +5 −4 Original line number Diff line number Diff line Loading @@ -69,6 +69,9 @@ static int pagecache_read(struct inode *inode, void *buf, size_t count, static int pagecache_write(struct inode *inode, const void *buf, size_t count, loff_t pos) { struct address_space *mapping = inode->i_mapping; const struct address_space_operations *aops = mapping->a_ops; if (pos + count > inode->i_sb->s_maxbytes) return -EFBIG; Loading @@ -79,15 +82,13 @@ static int pagecache_write(struct inode *inode, const void *buf, size_t count, void *fsdata; int res; res = pagecache_write_begin(NULL, inode->i_mapping, pos, n, 0, &page, &fsdata); res = aops->write_begin(NULL, mapping, pos, n, &page, &fsdata); if (res) return res; memcpy_to_page(page, offset_in_page(pos), buf, n); res = pagecache_write_end(NULL, inode->i_mapping, pos, n, n, page, fsdata); res = aops->write_end(NULL, mapping, pos, n, n, page, fsdata); if (res < 0) return res; if (res != n) Loading Loading
fs/ext4/verity.c +5 −4 Original line number Diff line number Diff line Loading @@ -69,6 +69,9 @@ static int pagecache_read(struct inode *inode, void *buf, size_t count, static int pagecache_write(struct inode *inode, const void *buf, size_t count, loff_t pos) { struct address_space *mapping = inode->i_mapping; const struct address_space_operations *aops = mapping->a_ops; if (pos + count > inode->i_sb->s_maxbytes) return -EFBIG; Loading @@ -79,15 +82,13 @@ static int pagecache_write(struct inode *inode, const void *buf, size_t count, void *fsdata; int res; res = pagecache_write_begin(NULL, inode->i_mapping, pos, n, 0, &page, &fsdata); res = aops->write_begin(NULL, mapping, pos, n, &page, &fsdata); if (res) return res; memcpy_to_page(page, offset_in_page(pos), buf, n); res = pagecache_write_end(NULL, inode->i_mapping, pos, n, n, page, fsdata); res = aops->write_end(NULL, mapping, pos, n, n, page, fsdata); if (res < 0) return res; if (res != n) Loading