Convert code using iocb->ki_left to use the more generic iov_length() call.
--- diff -urpN -X dontdiff a/fs/ocfs2/file.c b/fs/ocfs2/file.c --- a/fs/ocfs2/file.c 2007-01-10 11:50:26.000000000 -0800 +++ b/fs/ocfs2/file.c 2007-01-10 12:42:09.000000000 -0800 @@ -1157,7 +1157,7 @@ static ssize_t ocfs2_file_aio_write(stru filp->f_path.dentry->d_name.name); /* happy write of zero bytes */ - if (iocb->ki_left == 0) + if (iov_length(iov, nr_segs) == 0) return 0; mutex_lock(&inode->i_mutex); @@ -1177,7 +1177,7 @@ static ssize_t ocfs2_file_aio_write(stru } ret = ocfs2_prepare_inode_for_write(filp->f_path.dentry, &iocb->ki_pos, - iocb->ki_left, appending); + iov_length(iov, nr_segs), appending); if (ret < 0) { mlog_errno(ret); goto out; diff -urpN -X dontdiff a/fs/smbfs/file.c b/fs/smbfs/file.c --- a/fs/smbfs/file.c 2007-01-10 11:50:28.000000000 -0800 +++ b/fs/smbfs/file.c 2007-01-10 12:42:09.000000000 -0800 @@ -222,7 +222,7 @@ smb_file_aio_read(struct kiocb *iocb, co ssize_t status; VERBOSE("file %s/%s, [EMAIL PROTECTED]", DENTRY_PATH(dentry), - (unsigned long) iocb->ki_left, (unsigned long) pos); + (unsigned long) iov_length(iov, nr_segs), (unsigned long) pos); status = smb_revalidate_inode(dentry); if (status) { @@ -328,7 +328,7 @@ smb_file_aio_write(struct kiocb *iocb, c VERBOSE("file %s/%s, [EMAIL PROTECTED]", DENTRY_PATH(dentry), - (unsigned long) iocb->ki_left, (unsigned long) pos); + (unsigned long) iov_length(iov, nr_segs), (unsigned long) pos); result = smb_revalidate_inode(dentry); if (result) { @@ -341,7 +341,7 @@ smb_file_aio_write(struct kiocb *iocb, c if (result) goto out; - if (iocb->ki_left > 0) { + if (iov_length(iov, nr_segs) > 0) { result = generic_file_aio_write(iocb, iov, nr_segs, pos); VERBOSE("pos=%ld, size=%ld, mtime=%ld, atime=%ld\n", (long) file->f_pos, (long) dentry->d_inode->i_size, diff -urpN -X dontdiff a/fs/udf/file.c b/fs/udf/file.c --- a/fs/udf/file.c 2007-01-10 11:53:02.000000000 -0800 +++ b/fs/udf/file.c 2007-01-10 12:42:09.000000000 -0800 @@ -109,7 +109,7 @@ static ssize_t udf_file_aio_write(struct struct file *file = iocb->ki_filp; struct inode *inode = file->f_path.dentry->d_inode; int err, pos; - size_t count = iocb->ki_left; + size_t count = iov_length(iov, nr_segs); if (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_IN_ICB) { diff -urpN -X dontdiff a/net/socket.c b/net/socket.c --- a/net/socket.c 2007-01-10 12:40:54.000000000 -0800 +++ b/net/socket.c 2007-01-10 12:42:09.000000000 -0800 @@ -632,7 +632,7 @@ static ssize_t sock_aio_read(struct kioc if (pos != 0) return -ESPIPE; - if (iocb->ki_left == 0) /* Match SYS5 behaviour */ + if (iov_length(iov, nr_segs) == 0) /* Match SYS5 behaviour */ return 0; for (i = 0; i < nr_segs; i++) @@ -660,7 +660,7 @@ static ssize_t sock_aio_write(struct kio if (pos != 0) return -ESPIPE; - if (iocb->ki_left == 0) /* Match SYS5 behaviour */ + if (iov_length(iov, nr_segs) == 0) /* Match SYS5 behaviour */ return 0; for (i = 0; i < nr_segs; i++) - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/