Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 18650
b: refs/heads/master
c: 6383bda
h: refs/heads/master
v: v3
  • Loading branch information
Miklos Szeredi authored and Linus Torvalds committed Jan 17, 2006
1 parent 33e0a97 commit b8cf759
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8bfc016d2e2fff71c6843257f0fd0b60876331ed
refs/heads/master: 6383bdaa2ed2d461d9f4d369dfaa9d610fc972e3
4 changes: 2 additions & 2 deletions trunk/fs/fuse/dev.c
Original file line number Diff line number Diff line change
Expand Up @@ -361,8 +361,8 @@ void request_send_background(struct fuse_conn *fc, struct fuse_req *req)
void fuse_send_init(struct fuse_conn *fc)
{
/* This is called from fuse_read_super() so there's guaranteed
to be a request available */
struct fuse_req *req = do_get_request(fc);
to be exactly one request available */
struct fuse_req *req = fuse_get_request(fc);
struct fuse_init_in *arg = &req->misc.init_in;
arg->major = FUSE_KERNEL_VERSION;
arg->minor = FUSE_KERNEL_MINOR_VERSION;
Expand Down
7 changes: 1 addition & 6 deletions trunk/fs/fuse/fuse_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -280,14 +280,9 @@ struct fuse_conn {
struct backing_dev_info bdi;
};

static inline struct fuse_conn **get_fuse_conn_super_p(struct super_block *sb)
{
return (struct fuse_conn **) &sb->s_fs_info;
}

static inline struct fuse_conn *get_fuse_conn_super(struct super_block *sb)
{
return *get_fuse_conn_super_p(sb);
return sb->s_fs_info;
}

static inline struct fuse_conn *get_fuse_conn(struct inode *inode)
Expand Down
10 changes: 3 additions & 7 deletions trunk/fs/fuse/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,6 @@ static void fuse_put_super(struct super_block *sb)

spin_lock(&fuse_lock);
fc->mounted = 0;
fc->user_id = 0;
fc->group_id = 0;
fc->flags = 0;
/* Flush all readers on this fs */
wake_up_all(&fc->waitq);
up_write(&fc->sbput_sem);
Expand Down Expand Up @@ -379,16 +376,15 @@ static struct fuse_conn *new_conn(void)
{
struct fuse_conn *fc;

fc = kmalloc(sizeof(*fc), GFP_KERNEL);
fc = kzalloc(sizeof(*fc), GFP_KERNEL);
if (fc != NULL) {
int i;
memset(fc, 0, sizeof(*fc));
init_waitqueue_head(&fc->waitq);
INIT_LIST_HEAD(&fc->pending);
INIT_LIST_HEAD(&fc->processing);
INIT_LIST_HEAD(&fc->unused_list);
INIT_LIST_HEAD(&fc->background);
sema_init(&fc->outstanding_sem, 0);
sema_init(&fc->outstanding_sem, 1); /* One for INIT */
init_rwsem(&fc->sbput_sem);
for (i = 0; i < FUSE_MAX_OUTSTANDING; i++) {
struct fuse_req *req = fuse_request_alloc();
Expand Down Expand Up @@ -420,7 +416,7 @@ static struct fuse_conn *get_conn(struct file *file, struct super_block *sb)
fc = ERR_PTR(-EINVAL);
} else {
file->private_data = fc;
*get_fuse_conn_super_p(sb) = fc;
sb->s_fs_info = fc;
fc->mounted = 1;
fc->connected = 1;
fc->count = 2;
Expand Down

0 comments on commit b8cf759

Please sign in to comment.