30 #include <asm/uaccess.h>
31 #include <linux/kernel.h>
32 #include <linux/string.h>
33 #include <linux/capability.h>
34 #include <linux/errno.h>
42 static void __udf_adinicb_readpage(
struct page *
page)
52 SetPageUptodate(page);
59 __udf_adinicb_readpage(page);
65 static int udf_adinicb_writepage(
struct page *page,
76 mark_inode_dirty(inode);
77 SetPageUptodate(page);
84 static int udf_adinicb_write_begin(
struct file *file,
86 unsigned len,
unsigned flags,
struct page **pagep,
99 __udf_adinicb_readpage(page);
103 static int udf_adinicb_write_end(
struct file *file,
105 loff_t pos,
unsigned len,
unsigned copied,
106 struct page *page,
void *fsdata)
108 struct inode *inode = mapping->
host;
115 kaddr + offset, copied);
122 const struct iovec *iov,
123 loff_t
offset,
unsigned long nr_segs)
130 .readpage = udf_adinicb_readpage,
131 .writepage = udf_adinicb_writepage,
132 .write_begin = udf_adinicb_write_begin,
133 .write_end = udf_adinicb_write_end,
134 .direct_IO = udf_adinicb_direct_IO,
138 unsigned long nr_segs, loff_t ppos)
141 struct file *file = iocb->
ki_filp;
142 struct inode *inode = file->
f_path.dentry->d_inode;
154 if (inode->
i_sb->s_blocksize <
155 (udf_file_entry_alloc_offset(inode) +
159 udf_debug(
"udf_expand_adinicb: err=%d\n", err);
163 if (pos + count > inode->
i_size)
174 mark_inode_dirty(inode);
181 struct inode *inode = filp->f_dentry->d_inode;
192 udf_debug(
"invalid argument to udf_ioctl\n");
200 UDF_SB(inode->
i_sb)->s_volume_ident, 32))
215 old_block, &new_block);
224 UDF_I(inode)->i_ext.i_data,
225 UDF_I(inode)->i_lenEAttr) ? -
EFAULT : 0;
233 static int udf_release_file(
struct inode *inode,
struct file *filp)
239 up_write(&UDF_I(inode)->i_data_sem);
251 .aio_write = udf_file_aio_write,
252 .release = udf_release_file,
260 struct inode *inode = dentry->
d_inode;
268 attr->
ia_size != i_size_read(inode)) {
275 mark_inode_dirty(inode);
280 .setattr = udf_setattr,