inode.c (415d2b3392d7a80903e0f97f051201aa02bf20e9) inode.c (f168d9fd634a4612d308d7dbe0a4d2a9b366c045)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * linux/fs/hfsplus/inode.c
4 *
5 * Copyright (C) 2001
6 * Brad Boyer (flar@allandria.com)
7 * (C) 2003 Ardis Technologies <roman@ardistech.com>
8 *

--- 7 unchanged lines hidden (view full) ---

16#include <linux/mpage.h>
17#include <linux/sched.h>
18#include <linux/cred.h>
19#include <linux/uio.h>
20
21#include "hfsplus_fs.h"
22#include "hfsplus_raw.h"
23#include "xattr.h"
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * linux/fs/hfsplus/inode.c
4 *
5 * Copyright (C) 2001
6 * Brad Boyer (flar@allandria.com)
7 * (C) 2003 Ardis Technologies <roman@ardistech.com>
8 *

--- 7 unchanged lines hidden (view full) ---

16#include <linux/mpage.h>
17#include <linux/sched.h>
18#include <linux/cred.h>
19#include <linux/uio.h>
20
21#include "hfsplus_fs.h"
22#include "hfsplus_raw.h"
23#include "xattr.h"
24#include "acl.h"
25
26static int hfsplus_readpage(struct file *file, struct page *page)
27{
28 return block_read_full_page(page, hfsplus_get_block);
29}
30
31static int hfsplus_writepage(struct page *page, struct writeback_control *wbc)
32{

--- 229 unchanged lines hidden (view full) ---

262 }
263 truncate_setsize(inode, attr->ia_size);
264 hfsplus_file_truncate(inode);
265 }
266
267 setattr_copy(inode, attr);
268 mark_inode_dirty(inode);
269
24
25static int hfsplus_readpage(struct file *file, struct page *page)
26{
27 return block_read_full_page(page, hfsplus_get_block);
28}
29
30static int hfsplus_writepage(struct page *page, struct writeback_control *wbc)
31{

--- 229 unchanged lines hidden (view full) ---

261 }
262 truncate_setsize(inode, attr->ia_size);
263 hfsplus_file_truncate(inode);
264 }
265
266 setattr_copy(inode, attr);
267 mark_inode_dirty(inode);
268
270 if (attr->ia_valid & ATTR_MODE) {
271 error = posix_acl_chmod(inode, inode->i_mode);
272 if (unlikely(error))
273 return error;
274 }
275
276 return 0;
277}
278
279int hfsplus_file_fsync(struct file *file, loff_t start, loff_t end,
280 int datasync)
281{
282 struct inode *inode = file->f_mapping->host;
283 struct hfsplus_inode_info *hip = HFSPLUS_I(inode);

--- 47 unchanged lines hidden (view full) ---

331 inode_unlock(inode);
332
333 return error;
334}
335
336static const struct inode_operations hfsplus_file_inode_operations = {
337 .setattr = hfsplus_setattr,
338 .listxattr = hfsplus_listxattr,
269 return 0;
270}
271
272int hfsplus_file_fsync(struct file *file, loff_t start, loff_t end,
273 int datasync)
274{
275 struct inode *inode = file->f_mapping->host;
276 struct hfsplus_inode_info *hip = HFSPLUS_I(inode);

--- 47 unchanged lines hidden (view full) ---

324 inode_unlock(inode);
325
326 return error;
327}
328
329static const struct inode_operations hfsplus_file_inode_operations = {
330 .setattr = hfsplus_setattr,
331 .listxattr = hfsplus_listxattr,
339#ifdef CONFIG_HFSPLUS_FS_POSIX_ACL
340 .get_acl = hfsplus_get_posix_acl,
341 .set_acl = hfsplus_set_posix_acl,
342#endif
343};
344
345static const struct file_operations hfsplus_file_operations = {
346 .llseek = generic_file_llseek,
347 .read_iter = generic_file_read_iter,
348 .write_iter = generic_file_write_iter,
349 .mmap = generic_file_mmap,
350 .splice_read = generic_file_splice_read,

--- 267 unchanged lines hidden ---
332};
333
334static const struct file_operations hfsplus_file_operations = {
335 .llseek = generic_file_llseek,
336 .read_iter = generic_file_read_iter,
337 .write_iter = generic_file_write_iter,
338 .mmap = generic_file_mmap,
339 .splice_read = generic_file_splice_read,

--- 267 unchanged lines hidden ---