diff options
Diffstat (limited to 'fs/afs')
| -rw-r--r-- | fs/afs/cell.c | 2 | ||||
| -rw-r--r-- | fs/afs/cmservice.c | 19 | ||||
| -rw-r--r-- | fs/afs/file.c | 8 | ||||
| -rw-r--r-- | fs/afs/flock.c | 4 | ||||
| -rw-r--r-- | fs/afs/inode.c | 4 | ||||
| -rw-r--r-- | fs/afs/internal.h | 5 | ||||
| -rw-r--r-- | fs/afs/main.c | 4 | ||||
| -rw-r--r-- | fs/afs/proc.c | 122 | ||||
| -rw-r--r-- | fs/afs/rxrpc.c | 84 | ||||
| -rw-r--r-- | fs/afs/vlocation.c | 3 | ||||
| -rw-r--r-- | fs/afs/volume.c | 2 | ||||
| -rw-r--r-- | fs/afs/write.c | 11 | 
12 files changed, 106 insertions, 162 deletions
diff --git a/fs/afs/cell.c b/fs/afs/cell.c index 3c090b7555e..ca0a3cf9379 100644 --- a/fs/afs/cell.c +++ b/fs/afs/cell.c @@ -179,7 +179,7 @@ struct afs_cell *afs_cell_create(const char *name, unsigned namesz,  	/* put it up for caching (this never returns an error) */  	cell->cache = fscache_acquire_cookie(afs_cache_netfs.primary_index,  					     &afs_cell_cache_index_def, -					     cell); +					     cell, true);  #endif  	/* add to the cell lists */ diff --git a/fs/afs/cmservice.c b/fs/afs/cmservice.c index 1c8c6cc6de3..4b0eff6da67 100644 --- a/fs/afs/cmservice.c +++ b/fs/afs/cmservice.c @@ -130,6 +130,15 @@ static void afs_cm_destructor(struct afs_call *call)  {  	_enter(""); +	/* Break the callbacks here so that we do it after the final ACK is +	 * received.  The step number here must match the final number in +	 * afs_deliver_cb_callback(). +	 */ +	if (call->unmarshall == 6) { +		ASSERT(call->server && call->count && call->request); +		afs_break_callbacks(call->server, call->count, call->request); +	} +  	afs_put_server(call->server);  	call->server = NULL;  	kfree(call->buffer); @@ -272,6 +281,16 @@ static int afs_deliver_cb_callback(struct afs_call *call, struct sk_buff *skb,  		_debug("trailer");  		if (skb->len != 0)  			return -EBADMSG; + +		/* Record that the message was unmarshalled successfully so +		 * that the call destructor can know do the callback breaking +		 * work, even if the final ACK isn't received. +		 * +		 * If the step number changes, then afs_cm_destructor() must be +		 * updated also. +		 */ +		call->unmarshall++; +	case 6:  		break;  	} diff --git a/fs/afs/file.c b/fs/afs/file.c index 66d50fe2ee4..932ce07948b 100644 --- a/fs/afs/file.c +++ b/fs/afs/file.c @@ -31,10 +31,10 @@ const struct file_operations afs_file_operations = {  	.open		= afs_open,  	.release	= afs_release,  	.llseek		= generic_file_llseek, -	.read		= do_sync_read, -	.write		= do_sync_write, -	.aio_read	= generic_file_aio_read, -	.aio_write	= afs_file_write, +	.read		= new_sync_read, +	.write		= new_sync_write, +	.read_iter	= generic_file_read_iter, +	.write_iter	= afs_file_write,  	.mmap		= generic_file_readonly_mmap,  	.splice_read	= generic_file_splice_read,  	.fsync		= afs_fsync, diff --git a/fs/afs/flock.c b/fs/afs/flock.c index a8cf2cff836..4baf1d2b39e 100644 --- a/fs/afs/flock.c +++ b/fs/afs/flock.c @@ -555,10 +555,6 @@ int afs_flock(struct file *file, int cmd, struct file_lock *fl)  		return -ENOLCK;  	/* we're simulating flock() locks using posix locks on the server */ -	fl->fl_owner = (fl_owner_t) file; -	fl->fl_start = 0; -	fl->fl_end = OFFSET_MAX; -  	if (fl->fl_type == F_UNLCK)  		return afs_do_unlk(file, fl);  	return afs_do_setlk(file, fl); diff --git a/fs/afs/inode.c b/fs/afs/inode.c index 789bc253b5f..29467128844 100644 --- a/fs/afs/inode.c +++ b/fs/afs/inode.c @@ -259,7 +259,7 @@ struct inode *afs_iget(struct super_block *sb, struct key *key,  #ifdef CONFIG_AFS_FSCACHE  	vnode->cache = fscache_acquire_cookie(vnode->volume->cache,  					      &afs_vnode_cache_index_def, -					      vnode); +					      vnode, true);  #endif  	ret = afs_inode_map_status(vnode, key); @@ -422,7 +422,7 @@ void afs_evict_inode(struct inode *inode)  	ASSERTCMP(inode->i_ino, ==, vnode->fid.vnode); -	truncate_inode_pages(&inode->i_data, 0); +	truncate_inode_pages_final(&inode->i_data);  	clear_inode(inode);  	afs_give_up_callback(vnode); diff --git a/fs/afs/internal.h b/fs/afs/internal.h index a306bb6d88d..71d5982312f 100644 --- a/fs/afs/internal.h +++ b/fs/afs/internal.h @@ -75,6 +75,7 @@ struct afs_call {  	const struct afs_call_type *type;	/* type of call */  	const struct afs_wait_mode *wait_mode;	/* completion wait mode */  	wait_queue_head_t	waitq;		/* processes awaiting completion */ +	void (*async_workfn)(struct afs_call *call); /* asynchronous work function */  	struct work_struct	async_work;	/* asynchronous work processor */  	struct work_struct	work;		/* actual work processor */  	struct sk_buff_head	rx_queue;	/* received packets */ @@ -195,7 +196,6 @@ struct afs_cell {  	struct list_head	link;		/* main cell list link */  	struct key		*anonymous_key;	/* anonymous user key for this cell */  	struct list_head	proc_link;	/* /proc cell list link */ -	struct proc_dir_entry	*proc_dir;	/* /proc dir for this cell */  #ifdef CONFIG_AFS_FSCACHE  	struct fscache_cookie	*cache;		/* caching cookie */  #endif @@ -747,8 +747,7 @@ extern int afs_write_end(struct file *file, struct address_space *mapping,  extern int afs_writepage(struct page *, struct writeback_control *);  extern int afs_writepages(struct address_space *, struct writeback_control *);  extern void afs_pages_written_back(struct afs_vnode *, struct afs_call *); -extern ssize_t afs_file_write(struct kiocb *, const struct iovec *, -			      unsigned long, loff_t); +extern ssize_t afs_file_write(struct kiocb *, struct iov_iter *);  extern int afs_writeback_all(struct afs_vnode *);  extern int afs_fsync(struct file *, loff_t, loff_t, int); diff --git a/fs/afs/main.c b/fs/afs/main.c index 42dd2e499ed..35de0c04729 100644 --- a/fs/afs/main.c +++ b/fs/afs/main.c @@ -55,13 +55,13 @@ static int __init afs_get_client_UUID(void)  	afs_uuid.time_low = uuidtime;  	afs_uuid.time_mid = uuidtime >> 32;  	afs_uuid.time_hi_and_version = (uuidtime >> 48) & AFS_UUID_TIMEHI_MASK; -	afs_uuid.time_hi_and_version = AFS_UUID_VERSION_TIME; +	afs_uuid.time_hi_and_version |= AFS_UUID_VERSION_TIME;  	get_random_bytes(&clockseq, 2);  	afs_uuid.clock_seq_low = clockseq;  	afs_uuid.clock_seq_hi_and_reserved =  		(clockseq >> 8) & AFS_UUID_CLOCKHI_MASK; -	afs_uuid.clock_seq_hi_and_reserved = AFS_UUID_VARIANT_STD; +	afs_uuid.clock_seq_hi_and_reserved |= AFS_UUID_VARIANT_STD;  	_debug("AFS UUID: %08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",  	       afs_uuid.time_low, diff --git a/fs/afs/proc.c b/fs/afs/proc.c index 526e4bbbde5..24a905b076f 100644 --- a/fs/afs/proc.c +++ b/fs/afs/proc.c @@ -41,11 +41,8 @@ static const struct file_operations afs_proc_cells_fops = {  	.write		= afs_proc_cells_write,  	.llseek		= seq_lseek,  	.release	= seq_release, -	.owner		= THIS_MODULE,  }; -static int afs_proc_rootcell_open(struct inode *inode, struct file *file); -static int afs_proc_rootcell_release(struct inode *inode, struct file *file);  static ssize_t afs_proc_rootcell_read(struct file *file, char __user *buf,  				      size_t size, loff_t *_pos);  static ssize_t afs_proc_rootcell_write(struct file *file, @@ -53,17 +50,12 @@ static ssize_t afs_proc_rootcell_write(struct file *file,  				       size_t size, loff_t *_pos);  static const struct file_operations afs_proc_rootcell_fops = { -	.open		= afs_proc_rootcell_open,  	.read		= afs_proc_rootcell_read,  	.write		= afs_proc_rootcell_write,  	.llseek		= no_llseek, -	.release	= afs_proc_rootcell_release, -	.owner		= THIS_MODULE,  };  static int afs_proc_cell_volumes_open(struct inode *inode, struct file *file); -static int afs_proc_cell_volumes_release(struct inode *inode, -					 struct file *file);  static void *afs_proc_cell_volumes_start(struct seq_file *p, loff_t *pos);  static void *afs_proc_cell_volumes_next(struct seq_file *p, void *v,  					loff_t *pos); @@ -81,14 +73,11 @@ static const struct file_operations afs_proc_cell_volumes_fops = {  	.open		= afs_proc_cell_volumes_open,  	.read		= seq_read,  	.llseek		= seq_lseek, -	.release	= afs_proc_cell_volumes_release, -	.owner		= THIS_MODULE, +	.release	= seq_release,  };  static int afs_proc_cell_vlservers_open(struct inode *inode,  					struct file *file); -static int afs_proc_cell_vlservers_release(struct inode *inode, -					   struct file *file);  static void *afs_proc_cell_vlservers_start(struct seq_file *p, loff_t *pos);  static void *afs_proc_cell_vlservers_next(struct seq_file *p, void *v,  					  loff_t *pos); @@ -106,13 +95,10 @@ static const struct file_operations afs_proc_cell_vlservers_fops = {  	.open		= afs_proc_cell_vlservers_open,  	.read		= seq_read,  	.llseek		= seq_lseek, -	.release	= afs_proc_cell_vlservers_release, -	.owner		= THIS_MODULE, +	.release	= seq_release,  };  static int afs_proc_cell_servers_open(struct inode *inode, struct file *file); -static int afs_proc_cell_servers_release(struct inode *inode, -					 struct file *file);  static void *afs_proc_cell_servers_start(struct seq_file *p, loff_t *pos);  static void *afs_proc_cell_servers_next(struct seq_file *p, void *v,  					loff_t *pos); @@ -130,8 +116,7 @@ static const struct file_operations afs_proc_cell_servers_fops = {  	.open		= afs_proc_cell_servers_open,  	.read		= seq_read,  	.llseek		= seq_lseek, -	.release	= afs_proc_cell_servers_release, -	.owner		= THIS_MODULE, +	.release	= seq_release,  };  /* @@ -139,29 +124,21 @@ static const struct file_operations afs_proc_cell_servers_fops = {   */  int afs_proc_init(void)  { -	struct proc_dir_entry *p; -  	_enter("");  	proc_afs = proc_mkdir("fs/afs", NULL);  	if (!proc_afs)  		goto error_dir; -	p = proc_create("cells", 0, proc_afs, &afs_proc_cells_fops); -	if (!p) -		goto error_cells; - -	p = proc_create("rootcell", 0, proc_afs, &afs_proc_rootcell_fops); -	if (!p) -		goto error_rootcell; +	if (!proc_create("cells", 0644, proc_afs, &afs_proc_cells_fops) || +	    !proc_create("rootcell", 0644, proc_afs, &afs_proc_rootcell_fops)) +		goto error_tree;  	_leave(" = 0");  	return 0; -error_rootcell: - 	remove_proc_entry("cells", proc_afs); -error_cells: -	remove_proc_entry("fs/afs", NULL); +error_tree: +	remove_proc_subtree("fs/afs", NULL);  error_dir:  	_leave(" = -ENOMEM");  	return -ENOMEM; @@ -172,9 +149,7 @@ error_dir:   */  void afs_proc_cleanup(void)  { -	remove_proc_entry("rootcell", proc_afs); -	remove_proc_entry("cells", proc_afs); -	remove_proc_entry("fs/afs", NULL); +	remove_proc_subtree("fs/afs", NULL);  }  /* @@ -319,19 +294,6 @@ inval:  	goto done;  } -/* - * Stubs for /proc/fs/afs/rootcell - */ -static int afs_proc_rootcell_open(struct inode *inode, struct file *file) -{ -	return 0; -} - -static int afs_proc_rootcell_release(struct inode *inode, struct file *file) -{ -	return 0; -} -  static ssize_t afs_proc_rootcell_read(struct file *file, char __user *buf,  				      size_t size, loff_t *_pos)  { @@ -387,38 +349,27 @@ nomem:   */  int afs_proc_cell_setup(struct afs_cell *cell)  { -	struct proc_dir_entry *p; +	struct proc_dir_entry *dir;  	_enter("%p{%s}", cell, cell->name); -	cell->proc_dir = proc_mkdir(cell->name, proc_afs); -	if (!cell->proc_dir) +	dir = proc_mkdir(cell->name, proc_afs); +	if (!dir)  		goto error_dir; -	p = proc_create_data("servers", 0, cell->proc_dir, -			     &afs_proc_cell_servers_fops, cell); -	if (!p) -		goto error_servers; - -	p = proc_create_data("vlservers", 0, cell->proc_dir, -			     &afs_proc_cell_vlservers_fops, cell); -	if (!p) -		goto error_vlservers; - -	p = proc_create_data("volumes", 0, cell->proc_dir, -			     &afs_proc_cell_volumes_fops, cell); -	if (!p) -		goto error_volumes; +	if (!proc_create_data("servers", 0, dir, +			     &afs_proc_cell_servers_fops, cell) || +	    !proc_create_data("vlservers", 0, dir, +			     &afs_proc_cell_vlservers_fops, cell) || +	    !proc_create_data("volumes", 0, dir, +			     &afs_proc_cell_volumes_fops, cell)) +		goto error_tree;  	_leave(" = 0");  	return 0; -error_volumes: -	remove_proc_entry("vlservers", cell->proc_dir); -error_vlservers: -	remove_proc_entry("servers", cell->proc_dir); -error_servers: -	remove_proc_entry(cell->name, proc_afs); +error_tree: +	remove_proc_subtree(cell->name, proc_afs);  error_dir:  	_leave(" = -ENOMEM");  	return -ENOMEM; @@ -431,10 +382,7 @@ void afs_proc_cell_remove(struct afs_cell *cell)  {  	_enter(""); -	remove_proc_entry("volumes", cell->proc_dir); -	remove_proc_entry("vlservers", cell->proc_dir); -	remove_proc_entry("servers", cell->proc_dir); -	remove_proc_entry(cell->name, proc_afs); +	remove_proc_subtree(cell->name, proc_afs);  	_leave("");  } @@ -463,14 +411,6 @@ static int afs_proc_cell_volumes_open(struct inode *inode, struct file *file)  }  /* - * close the file and release the ref to the cell - */ -static int afs_proc_cell_volumes_release(struct inode *inode, struct file *file) -{ -	return seq_release(inode, file); -} - -/*   * set up the iterator to start reading from the cells list and return the   * first item   */ @@ -569,15 +509,6 @@ static int afs_proc_cell_vlservers_open(struct inode *inode, struct file *file)  }  /* - * close the file and release the ref to the cell - */ -static int afs_proc_cell_vlservers_release(struct inode *inode, -					   struct file *file) -{ -	return seq_release(inode, file); -} - -/*   * set up the iterator to start reading from the cells list and return the   * first item   */ @@ -673,15 +604,6 @@ static int afs_proc_cell_servers_open(struct inode *inode, struct file *file)  }  /* - * close the file and release the ref to the cell - */ -static int afs_proc_cell_servers_release(struct inode *inode, -					 struct file *file) -{ -	return seq_release(inode, file); -} - -/*   * set up the iterator to start reading from the cells list and return the   * first item   */ diff --git a/fs/afs/rxrpc.c b/fs/afs/rxrpc.c index 8ad8c2a0703..03a3beb1700 100644 --- a/fs/afs/rxrpc.c +++ b/fs/afs/rxrpc.c @@ -25,7 +25,7 @@ static void afs_wake_up_call_waiter(struct afs_call *);  static int afs_wait_for_call_to_complete(struct afs_call *);  static void afs_wake_up_async_call(struct afs_call *);  static int afs_dont_wait_for_call_to_complete(struct afs_call *); -static void afs_process_async_call(struct work_struct *); +static void afs_process_async_call(struct afs_call *);  static void afs_rx_interceptor(struct sock *, unsigned long, struct sk_buff *);  static int afs_deliver_cm_op_id(struct afs_call *, struct sk_buff *, bool); @@ -58,6 +58,13 @@ static void afs_collect_incoming_call(struct work_struct *);  static struct sk_buff_head afs_incoming_calls;  static DECLARE_WORK(afs_collect_incoming_call_work, afs_collect_incoming_call); +static void afs_async_workfn(struct work_struct *work) +{ +	struct afs_call *call = container_of(work, struct afs_call, async_work); + +	call->async_workfn(call); +} +  /*   * open an RxRPC socket and bind it to be a server for callback notifications   * - the socket is left in blocking mode and non-blocking ops use MSG_DONTWAIT @@ -184,6 +191,28 @@ static void afs_free_call(struct afs_call *call)  }  /* + * End a call but do not free it + */ +static void afs_end_call_nofree(struct afs_call *call) +{ +	if (call->rxcall) { +		rxrpc_kernel_end_call(call->rxcall); +		call->rxcall = NULL; +	} +	if (call->type->destructor) +		call->type->destructor(call); +} + +/* + * End a call and free it + */ +static void afs_end_call(struct afs_call *call) +{ +	afs_end_call_nofree(call); +	afs_free_call(call); +} + +/*   * allocate a call with flat request and reply buffers   */  struct afs_call *afs_alloc_flat_call(const struct afs_call_type *type, @@ -326,7 +355,8 @@ int afs_make_call(struct in_addr *addr, struct afs_call *call, gfp_t gfp,  	       atomic_read(&afs_outstanding_calls));  	call->wait_mode = wait_mode; -	INIT_WORK(&call->async_work, afs_process_async_call); +	call->async_workfn = afs_process_async_call; +	INIT_WORK(&call->async_work, afs_async_workfn);  	memset(&srx, 0, sizeof(srx));  	srx.srx_family = AF_RXRPC; @@ -383,11 +413,8 @@ error_do_abort:  	rxrpc_kernel_abort_call(rxcall, RX_USER_ABORT);  	while ((skb = skb_dequeue(&call->rx_queue)))  		afs_free_skb(skb); -	rxrpc_kernel_end_call(rxcall); -	call->rxcall = NULL;  error_kill_call: -	call->type->destructor(call); -	afs_free_call(call); +	afs_end_call(call);  	_leave(" = %d", ret);  	return ret;  } @@ -509,12 +536,8 @@ static void afs_deliver_to_call(struct afs_call *call)  	if (call->state >= AFS_CALL_COMPLETE) {  		while ((skb = skb_dequeue(&call->rx_queue)))  			afs_free_skb(skb); -		if (call->incoming) { -			rxrpc_kernel_end_call(call->rxcall); -			call->rxcall = NULL; -			call->type->destructor(call); -			afs_free_call(call); -		} +		if (call->incoming) +			afs_end_call(call);  	}  	_leave(""); @@ -564,10 +587,7 @@ static int afs_wait_for_call_to_complete(struct afs_call *call)  	}  	_debug("call complete"); -	rxrpc_kernel_end_call(call->rxcall); -	call->rxcall = NULL; -	call->type->destructor(call); -	afs_free_call(call); +	afs_end_call(call);  	_leave(" = %d", ret);  	return ret;  } @@ -603,11 +623,8 @@ static int afs_dont_wait_for_call_to_complete(struct afs_call *call)  /*   * delete an asynchronous call   */ -static void afs_delete_async_call(struct work_struct *work) +static void afs_delete_async_call(struct afs_call *call)  { -	struct afs_call *call = -		container_of(work, struct afs_call, async_work); -  	_enter("");  	afs_free_call(call); @@ -620,11 +637,8 @@ static void afs_delete_async_call(struct work_struct *work)   * - on a multiple-thread workqueue this work item may try to run on several   *   CPUs at the same time   */ -static void afs_process_async_call(struct work_struct *work) +static void afs_process_async_call(struct afs_call *call)  { -	struct afs_call *call = -		container_of(work, struct afs_call, async_work); -  	_enter("");  	if (!skb_queue_empty(&call->rx_queue)) @@ -637,14 +651,11 @@ static void afs_process_async_call(struct work_struct *work)  		call->reply = NULL;  		/* kill the call */ -		rxrpc_kernel_end_call(call->rxcall); -		call->rxcall = NULL; -		if (call->type->destructor) -			call->type->destructor(call); +		afs_end_call_nofree(call);  		/* we can't just delete the call because the work item may be  		 * queued */ -		PREPARE_WORK(&call->async_work, afs_delete_async_call); +		call->async_workfn = afs_delete_async_call;  		queue_work(afs_async_calls, &call->async_work);  	} @@ -685,7 +696,8 @@ static void afs_collect_incoming_call(struct work_struct *work)  				return;  			} -			INIT_WORK(&call->async_work, afs_process_async_call); +			call->async_workfn = afs_process_async_call; +			INIT_WORK(&call->async_work, afs_async_workfn);  			call->wait_mode = &afs_async_incoming_call;  			call->type = &afs_RXCMxxxx;  			init_waitqueue_head(&call->waitq); @@ -782,10 +794,7 @@ void afs_send_empty_reply(struct afs_call *call)  		_debug("oom");  		rxrpc_kernel_abort_call(call->rxcall, RX_USER_ABORT);  	default: -		rxrpc_kernel_end_call(call->rxcall); -		call->rxcall = NULL; -		call->type->destructor(call); -		afs_free_call(call); +		afs_end_call(call);  		_leave(" [error]");  		return;  	} @@ -815,17 +824,16 @@ void afs_send_simple_reply(struct afs_call *call, const void *buf, size_t len)  	call->state = AFS_CALL_AWAIT_ACK;  	n = rxrpc_kernel_send_data(call->rxcall, &msg, len);  	if (n >= 0) { +		/* Success */  		_leave(" [replied]");  		return;  	} +  	if (n == -ENOMEM) {  		_debug("oom");  		rxrpc_kernel_abort_call(call->rxcall, RX_USER_ABORT);  	} -	rxrpc_kernel_end_call(call->rxcall); -	call->rxcall = NULL; -	call->type->destructor(call); -	afs_free_call(call); +	afs_end_call(call);  	_leave(" [error]");  } diff --git a/fs/afs/vlocation.c b/fs/afs/vlocation.c index 57bcb159653..b6df2e83809 100644 --- a/fs/afs/vlocation.c +++ b/fs/afs/vlocation.c @@ -308,7 +308,8 @@ static int afs_vlocation_fill_in_record(struct afs_vlocation *vl,  	/* see if we have an in-cache copy (will set vl->valid if there is) */  #ifdef CONFIG_AFS_FSCACHE  	vl->cache = fscache_acquire_cookie(vl->cell->cache, -					   &afs_vlocation_cache_index_def, vl); +					   &afs_vlocation_cache_index_def, vl, +					   true);  #endif  	if (vl->valid) { diff --git a/fs/afs/volume.c b/fs/afs/volume.c index 401eeb21869..2b607257820 100644 --- a/fs/afs/volume.c +++ b/fs/afs/volume.c @@ -131,7 +131,7 @@ struct afs_volume *afs_volume_lookup(struct afs_mount_params *params)  #ifdef CONFIG_AFS_FSCACHE  	volume->cache = fscache_acquire_cookie(vlocation->cache,  					       &afs_volume_cache_index_def, -					       volume); +					       volume, true);  #endif  	afs_get_vlocation(vlocation);  	volume->vlocation = vlocation; diff --git a/fs/afs/write.c b/fs/afs/write.c index a890db4b989..ab6adfd5251 100644 --- a/fs/afs/write.c +++ b/fs/afs/write.c @@ -625,15 +625,14 @@ void afs_pages_written_back(struct afs_vnode *vnode, struct afs_call *call)  /*   * write to an AFS file   */ -ssize_t afs_file_write(struct kiocb *iocb, const struct iovec *iov, -		       unsigned long nr_segs, loff_t pos) +ssize_t afs_file_write(struct kiocb *iocb, struct iov_iter *from)  {  	struct afs_vnode *vnode = AFS_FS_I(file_inode(iocb->ki_filp));  	ssize_t result; -	size_t count = iov_length(iov, nr_segs); +	size_t count = iov_iter_count(from); -	_enter("{%x.%u},{%zu},%lu,", -	       vnode->fid.vid, vnode->fid.vnode, count, nr_segs); +	_enter("{%x.%u},{%zu},", +	       vnode->fid.vid, vnode->fid.vnode, count);  	if (IS_SWAPFILE(&vnode->vfs_inode)) {  		printk(KERN_INFO @@ -644,7 +643,7 @@ ssize_t afs_file_write(struct kiocb *iocb, const struct iovec *iov,  	if (!count)  		return 0; -	result = generic_file_aio_write(iocb, iov, nr_segs, pos); +	result = generic_file_write_iter(iocb, from);  	if (IS_ERR_VALUE(result)) {  		_leave(" = %zd", result);  		return result;  | 
