file.c (33ca8a53f262b4af40611bea331b8c87d133af72) | file.c (66ee59af630fd8d5f4f56fb28162857e629aa0ab) |
---|---|
1/* 2 * file.c 3 * 4 * PURPOSE 5 * File handling routines for the OSTA-UDF(tm) filesystem. 6 * 7 * COPYRIGHT 8 * This file is distributed under the terms of the GNU General Public --- 108 unchanged lines hidden (view full) --- 117}; 118 119static ssize_t udf_file_write_iter(struct kiocb *iocb, struct iov_iter *from) 120{ 121 ssize_t retval; 122 struct file *file = iocb->ki_filp; 123 struct inode *inode = file_inode(file); 124 int err, pos; | 1/* 2 * file.c 3 * 4 * PURPOSE 5 * File handling routines for the OSTA-UDF(tm) filesystem. 6 * 7 * COPYRIGHT 8 * This file is distributed under the terms of the GNU General Public --- 108 unchanged lines hidden (view full) --- 117}; 118 119static ssize_t udf_file_write_iter(struct kiocb *iocb, struct iov_iter *from) 120{ 121 ssize_t retval; 122 struct file *file = iocb->ki_filp; 123 struct inode *inode = file_inode(file); 124 int err, pos; |
125 size_t count = iocb->ki_nbytes; | 125 size_t count = iov_iter_count(from); |
126 struct udf_inode_info *iinfo = UDF_I(inode); 127 128 mutex_lock(&inode->i_mutex); 129 down_write(&iinfo->i_data_sem); 130 if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) { 131 if (file->f_flags & O_APPEND) 132 pos = inode->i_size; 133 else --- 146 unchanged lines hidden --- | 126 struct udf_inode_info *iinfo = UDF_I(inode); 127 128 mutex_lock(&inode->i_mutex); 129 down_write(&iinfo->i_data_sem); 130 if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) { 131 if (file->f_flags & O_APPEND) 132 pos = inode->i_size; 133 else --- 146 unchanged lines hidden --- |