diff options
| author | Rodrigo Vivi <[email protected]> | 2018-07-23 09:13:12 -0700 | 
|---|---|---|
| committer | Rodrigo Vivi <[email protected]> | 2018-07-23 09:13:12 -0700 | 
| commit | c74a7469f97c0f40b46e82ee979f9fb1bb6e847c (patch) | |
| tree | f2690a1a916b73ef94657fbf0e0141ae57701825 /fs/cifs/cifssmb.c | |
| parent | 6f15a7de86c8cf2dc09fc9e6d07047efa40ef809 (diff) | |
| parent | 500775074f88d9cf5416bed2ca19592812d62c41 (diff) | |
Merge drm/drm-next into drm-intel-next-queued
We need a backmerge to get DP_DPCD_REV_14 before we push other
i915 changes to dinq that could break compilation.
Signed-off-by: Rodrigo Vivi <[email protected]>
Diffstat (limited to 'fs/cifs/cifssmb.c')
| -rw-r--r-- | fs/cifs/cifssmb.c | 23 | 
1 files changed, 20 insertions, 3 deletions
| diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c index 1529a088383d..d352da325de3 100644 --- a/fs/cifs/cifssmb.c +++ b/fs/cifs/cifssmb.c @@ -106,6 +106,12 @@ cifs_mark_open_files_invalid(struct cifs_tcon *tcon)  		open_file->oplock_break_cancelled = true;  	}  	spin_unlock(&tcon->open_file_lock); + +	mutex_lock(&tcon->crfid.fid_mutex); +	tcon->crfid.is_valid = false; +	memset(tcon->crfid.fid, 0, sizeof(struct cifs_fid)); +	mutex_unlock(&tcon->crfid.fid_mutex); +  	/*  	 * BB Add call to invalidate_inodes(sb) for all superblocks mounted  	 * to this tcon. @@ -1946,6 +1952,7 @@ cifs_writedata_release(struct kref *refcount)  	if (wdata->cfile)  		cifsFileInfo_put(wdata->cfile); +	kvfree(wdata->pages);  	kfree(wdata);  } @@ -2069,12 +2076,22 @@ cifs_writev_complete(struct work_struct *work)  struct cifs_writedata *  cifs_writedata_alloc(unsigned int nr_pages, work_func_t complete)  { +	struct page **pages = +		kcalloc(nr_pages, sizeof(struct page *), GFP_NOFS); +	if (pages) +		return cifs_writedata_direct_alloc(pages, complete); + +	return NULL; +} + +struct cifs_writedata * +cifs_writedata_direct_alloc(struct page **pages, work_func_t complete) +{  	struct cifs_writedata *wdata; -	/* writedata + number of page pointers */ -	wdata = kzalloc(sizeof(*wdata) + -			sizeof(struct page *) * nr_pages, GFP_NOFS); +	wdata = kzalloc(sizeof(*wdata), GFP_NOFS);  	if (wdata != NULL) { +		wdata->pages = pages;  		kref_init(&wdata->refcount);  		INIT_LIST_HEAD(&wdata->list);  		init_completion(&wdata->done); |