Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 44346cfe authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull FUSE fixes from Miklos Szeredi:
 "This contains bugfixes for FUSE and CUSE and a compile warning fix."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mszeredi/fuse:
  fuse: fix retrieve length
  fuse: mark variables uninitialized
  cuse: kill connection on initialization error
  cuse: fix fuse_conn_kill()
parents e9bd8f16 c9e67d48
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -117,7 +117,7 @@ static ssize_t fuse_conn_max_background_write(struct file *file,
					      const char __user *buf,
					      size_t count, loff_t *ppos)
{
	unsigned val;
	unsigned uninitialized_var(val);
	ssize_t ret;

	ret = fuse_conn_limit_write(file, buf, count, ppos, &val,
@@ -154,7 +154,7 @@ static ssize_t fuse_conn_congestion_threshold_write(struct file *file,
						    const char __user *buf,
						    size_t count, loff_t *ppos)
{
	unsigned val;
	unsigned uninitialized_var(val);
	ssize_t ret;

	ret = fuse_conn_limit_write(file, buf, count, ppos, &val,
+1 −3
Original line number Diff line number Diff line
@@ -396,7 +396,7 @@ err_device:
err_region:
	unregister_chrdev_region(devt, 1);
err:
	fc->conn_error = 1;
	fuse_conn_kill(fc);
	goto out;
}

@@ -532,8 +532,6 @@ static int cuse_channel_release(struct inode *inode, struct file *file)
		cdev_del(cc->cdev);
	}

	/* kill connection and shutdown channel */
	fuse_conn_kill(&cc->fc);
	rc = fuse_dev_release(inode, file);	/* puts the base reference */

	return rc;
+1 −0
Original line number Diff line number Diff line
@@ -1576,6 +1576,7 @@ static int fuse_retrieve(struct fuse_conn *fc, struct inode *inode,
		req->pages[req->num_pages] = page;
		req->num_pages++;

		offset = 0;
		num -= this_num;
		total_len += this_num;
		index++;
+7 −5
Original line number Diff line number Diff line
@@ -367,11 +367,6 @@ void fuse_conn_kill(struct fuse_conn *fc)
	wake_up_all(&fc->waitq);
	wake_up_all(&fc->blocked_waitq);
	wake_up_all(&fc->reserved_req_waitq);
	mutex_lock(&fuse_mutex);
	list_del(&fc->entry);
	fuse_ctl_remove_conn(fc);
	mutex_unlock(&fuse_mutex);
	fuse_bdi_destroy(fc);
}
EXPORT_SYMBOL_GPL(fuse_conn_kill);

@@ -380,7 +375,14 @@ static void fuse_put_super(struct super_block *sb)
	struct fuse_conn *fc = get_fuse_conn_super(sb);

	fuse_send_destroy(fc);

	fuse_conn_kill(fc);
	mutex_lock(&fuse_mutex);
	list_del(&fc->entry);
	fuse_ctl_remove_conn(fc);
	mutex_unlock(&fuse_mutex);
	fuse_bdi_destroy(fc);

	fuse_conn_put(fc);
}