fuse: style fixes

Fix coding style errors reported by checkpatch and others.  Uptdate
copyright date to 2008.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
This commit is contained in:
Miklos Szeredi 2008-11-26 12:03:54 +01:00 committed by Miklos Szeredi
parent ed313489ba
commit 1729a16c2c
6 changed files with 54 additions and 47 deletions

View file

@ -1,6 +1,6 @@
/* /*
FUSE: Filesystem in Userspace FUSE: Filesystem in Userspace
Copyright (C) 2001-2006 Miklos Szeredi <miklos@szeredi.hu> Copyright (C) 2001-2008 Miklos Szeredi <miklos@szeredi.hu>
This program can be distributed under the terms of the GNU GPL. This program can be distributed under the terms of the GNU GPL.
See the file COPYING. See the file COPYING.
@ -48,11 +48,13 @@ static ssize_t fuse_conn_waiting_read(struct file *file, char __user *buf,
size_t size; size_t size;
if (!*ppos) { if (!*ppos) {
long value;
struct fuse_conn *fc = fuse_ctl_file_conn_get(file); struct fuse_conn *fc = fuse_ctl_file_conn_get(file);
if (!fc) if (!fc)
return 0; return 0;
file->private_data=(void *)(long)atomic_read(&fc->num_waiting); value = atomic_read(&fc->num_waiting);
file->private_data = (void *)value;
fuse_conn_put(fc); fuse_conn_put(fc);
} }
size = sprintf(tmp, "%ld\n", (long)file->private_data); size = sprintf(tmp, "%ld\n", (long)file->private_data);

View file

@ -1,6 +1,6 @@
/* /*
FUSE: Filesystem in Userspace FUSE: Filesystem in Userspace
Copyright (C) 2001-2006 Miklos Szeredi <miklos@szeredi.hu> Copyright (C) 2001-2008 Miklos Szeredi <miklos@szeredi.hu>
This program can be distributed under the terms of the GNU GPL. This program can be distributed under the terms of the GNU GPL.
See the file COPYING. See the file COPYING.
@ -589,9 +589,11 @@ static int fuse_copy_page(struct fuse_copy_state *cs, struct page *page,
kunmap_atomic(mapaddr, KM_USER1); kunmap_atomic(mapaddr, KM_USER1);
} }
while (count) { while (count) {
int err; if (!cs->len) {
if (!cs->len && (err = fuse_copy_fill(cs))) int err = fuse_copy_fill(cs);
if (err)
return err; return err;
}
if (page) { if (page) {
void *mapaddr = kmap_atomic(page, KM_USER1); void *mapaddr = kmap_atomic(page, KM_USER1);
void *buf = mapaddr + offset; void *buf = mapaddr + offset;
@ -631,9 +633,11 @@ static int fuse_copy_pages(struct fuse_copy_state *cs, unsigned nbytes,
static int fuse_copy_one(struct fuse_copy_state *cs, void *val, unsigned size) static int fuse_copy_one(struct fuse_copy_state *cs, void *val, unsigned size)
{ {
while (size) { while (size) {
int err; if (!cs->len) {
if (!cs->len && (err = fuse_copy_fill(cs))) int err = fuse_copy_fill(cs);
if (err)
return err; return err;
}
fuse_copy_do(cs, &val, &size); fuse_copy_do(cs, &val, &size);
} }
return 0; return 0;

View file

@ -1,6 +1,6 @@
/* /*
FUSE: Filesystem in Userspace FUSE: Filesystem in Userspace
Copyright (C) 2001-2006 Miklos Szeredi <miklos@szeredi.hu> Copyright (C) 2001-2008 Miklos Szeredi <miklos@szeredi.hu>
This program can be distributed under the terms of the GNU GPL. This program can be distributed under the terms of the GNU GPL.
See the file COPYING. See the file COPYING.
@ -637,9 +637,11 @@ static int fuse_unlink(struct inode *dir, struct dentry *entry)
if (!err) { if (!err) {
struct inode *inode = entry->d_inode; struct inode *inode = entry->d_inode;
/* Set nlink to zero so the inode can be cleared, if /*
the inode does have more links this will be * Set nlink to zero so the inode can be cleared, if the inode
discovered at the next lookup/getattr */ * does have more links this will be discovered at the next
* lookup/getattr.
*/
clear_nlink(inode); clear_nlink(inode);
fuse_invalidate_attr(inode); fuse_invalidate_attr(inode);
fuse_invalidate_attr(dir); fuse_invalidate_attr(dir);

View file

@ -1,6 +1,6 @@
/* /*
FUSE: Filesystem in Userspace FUSE: Filesystem in Userspace
Copyright (C) 2001-2006 Miklos Szeredi <miklos@szeredi.hu> Copyright (C) 2001-2008 Miklos Szeredi <miklos@szeredi.hu>
This program can be distributed under the terms of the GNU GPL. This program can be distributed under the terms of the GNU GPL.
See the file COPYING. See the file COPYING.

View file

@ -1,6 +1,6 @@
/* /*
FUSE: Filesystem in Userspace FUSE: Filesystem in Userspace
Copyright (C) 2001-2006 Miklos Szeredi <miklos@szeredi.hu> Copyright (C) 2001-2008 Miklos Szeredi <miklos@szeredi.hu>
This program can be distributed under the terms of the GNU GPL. This program can be distributed under the terms of the GNU GPL.
See the file COPYING. See the file COPYING.

View file

@ -1,6 +1,6 @@
/* /*
FUSE: Filesystem in Userspace FUSE: Filesystem in Userspace
Copyright (C) 2001-2006 Miklos Szeredi <miklos@szeredi.hu> Copyright (C) 2001-2008 Miklos Szeredi <miklos@szeredi.hu>
This program can be distributed under the terms of the GNU GPL. This program can be distributed under the terms of the GNU GPL.
See the file COPYING. See the file COPYING.
@ -553,8 +553,7 @@ static struct inode *get_root_inode(struct super_block *sb, unsigned mode)
return fuse_iget(sb, 1, 0, &attr, 0, 0); return fuse_iget(sb, 1, 0, &attr, 0, 0);
} }
struct fuse_inode_handle struct fuse_inode_handle {
{
u64 nodeid; u64 nodeid;
u32 generation; u32 generation;
}; };
@ -1031,7 +1030,7 @@ static int __init fuse_init(void)
{ {
int res; int res;
printk("fuse init (API version %i.%i)\n", printk(KERN_INFO "fuse init (API version %i.%i)\n",
FUSE_KERNEL_VERSION, FUSE_KERNEL_MINOR_VERSION); FUSE_KERNEL_VERSION, FUSE_KERNEL_MINOR_VERSION);
INIT_LIST_HEAD(&fuse_conn_list); INIT_LIST_HEAD(&fuse_conn_list);