Fix coding style errors reported by checkpatch and others. Uptdate
copyright date to 2008.
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
/*
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.
See the file COPYING.
This program can be distributed under the terms of the GNU GPL.
See the file COPYING.
size_t size;
if (!*ppos) {
size_t size;
if (!*ppos) {
struct fuse_conn *fc = fuse_ctl_file_conn_get(file);
if (!fc)
return 0;
struct fuse_conn *fc = fuse_ctl_file_conn_get(file);
if (!fc)
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);
}
size = sprintf(tmp, "%ld\n", (long)file->private_data);
fuse_conn_put(fc);
}
size = sprintf(tmp, "%ld\n", (long)file->private_data);
/*
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.
See the file COPYING.
This program can be distributed under the terms of the GNU GPL.
See the file COPYING.
BUG_ON(!cs->nr_segs);
cs->seglen = cs->iov[0].iov_len;
cs->addr = (unsigned long) cs->iov[0].iov_base;
BUG_ON(!cs->nr_segs);
cs->seglen = cs->iov[0].iov_len;
cs->addr = (unsigned long) cs->iov[0].iov_base;
- cs->iov ++;
- cs->nr_segs --;
+ cs->iov++;
+ cs->nr_segs--;
}
down_read(¤t->mm->mmap_sem);
err = get_user_pages(current, current->mm, cs->addr, 1, cs->write, 0,
}
down_read(¤t->mm->mmap_sem);
err = get_user_pages(current, current->mm, cs->addr, 1, cs->write, 0,
kunmap_atomic(mapaddr, KM_USER1);
}
while (count) {
kunmap_atomic(mapaddr, KM_USER1);
}
while (count) {
- int err;
- if (!cs->len && (err = fuse_copy_fill(cs)))
- return err;
+ if (!cs->len) {
+ int err = fuse_copy_fill(cs);
+ if (err)
+ return err;
+ }
if (page) {
void *mapaddr = kmap_atomic(page, KM_USER1);
void *buf = mapaddr + offset;
if (page) {
void *mapaddr = kmap_atomic(page, KM_USER1);
void *buf = mapaddr + offset;
static int fuse_copy_one(struct fuse_copy_state *cs, void *val, unsigned size)
{
while (size) {
static int fuse_copy_one(struct fuse_copy_state *cs, void *val, unsigned size)
{
while (size) {
- int err;
- if (!cs->len && (err = fuse_copy_fill(cs)))
- return err;
+ if (!cs->len) {
+ int err = fuse_copy_fill(cs);
+ if (err)
+ return err;
+ }
fuse_copy_do(cs, &val, &size);
}
return 0;
fuse_copy_do(cs, &val, &size);
}
return 0;
/*
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.
See the file COPYING.
This program can be distributed under the terms of the GNU GPL.
See the file COPYING.
return 0;
}
spin_lock(&fc->lock);
return 0;
}
spin_lock(&fc->lock);
spin_unlock(&fc->lock);
}
fuse_put_request(fc, forget_req);
spin_unlock(&fc->lock);
}
fuse_put_request(fc, forget_req);
if (!err) {
struct inode *inode = entry->d_inode;
if (!err) {
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
- discovered at the next lookup/getattr */
+ /*
+ * Set nlink to zero so the inode can be cleared, if the inode
+ * does have more links this will be discovered at the next
+ * lookup/getattr.
+ */
clear_nlink(inode);
fuse_invalidate_attr(inode);
fuse_invalidate_attr(dir);
clear_nlink(inode);
fuse_invalidate_attr(inode);
fuse_invalidate_attr(dir);
/*
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.
See the file COPYING.
This program can be distributed under the terms of the GNU GPL.
See the file COPYING.
}
}
req->pages[req->num_pages] = page;
}
}
req->pages[req->num_pages] = page;
/*
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.
See the file COPYING.
This program can be distributed under the terms of the GNU GPL.
See the file COPYING.
/** Connection failed (version mismatch). Cannot race with
setting other bitfields since it is only set once in INIT
reply, before any other request, and never cleared */
/** Connection failed (version mismatch). Cannot race with
setting other bitfields since it is only set once in INIT
reply, before any other request, and never cleared */
- unsigned conn_error : 1;
/** Connection successful. Only set in INIT */
/** Connection successful. Only set in INIT */
- unsigned conn_init : 1;
/** Do readpages asynchronously? Only set in INIT */
/** Do readpages asynchronously? Only set in INIT */
- unsigned async_read : 1;
/** Do not send separate SETATTR request before open(O_TRUNC) */
/** Do not send separate SETATTR request before open(O_TRUNC) */
- unsigned atomic_o_trunc : 1;
+ unsigned atomic_o_trunc:1;
/** Filesystem supports NFS exporting. Only set in INIT */
/** Filesystem supports NFS exporting. Only set in INIT */
- unsigned export_support : 1;
+ unsigned export_support:1;
/*
* The following bitfields are only for optimization purposes
/*
* The following bitfields are only for optimization purposes
*/
/** Is fsync not implemented by fs? */
*/
/** Is fsync not implemented by fs? */
/** Is fsyncdir not implemented by fs? */
/** Is fsyncdir not implemented by fs? */
- unsigned no_fsyncdir : 1;
+ unsigned no_fsyncdir:1;
/** Is flush not implemented by fs? */
/** Is flush not implemented by fs? */
/** Is setxattr not implemented by fs? */
/** Is setxattr not implemented by fs? */
- unsigned no_setxattr : 1;
+ unsigned no_setxattr:1;
/** Is getxattr not implemented by fs? */
/** Is getxattr not implemented by fs? */
- unsigned no_getxattr : 1;
+ unsigned no_getxattr:1;
/** Is listxattr not implemented by fs? */
/** Is listxattr not implemented by fs? */
- unsigned no_listxattr : 1;
+ unsigned no_listxattr:1;
/** Is removexattr not implemented by fs? */
/** Is removexattr not implemented by fs? */
- unsigned no_removexattr : 1;
+ unsigned no_removexattr:1;
/** Are file locking primitives not implemented by fs? */
/** Are file locking primitives not implemented by fs? */
/** Is access not implemented by fs? */
/** Is access not implemented by fs? */
- unsigned no_access : 1;
/** Is create not implemented by fs? */
/** Is create not implemented by fs? */
- unsigned no_create : 1;
/** Is interrupt not implemented by fs? */
/** Is interrupt not implemented by fs? */
- unsigned no_interrupt : 1;
+ unsigned no_interrupt:1;
/** Is bmap not implemented by fs? */
/** Is bmap not implemented by fs? */
/** Do multi-page cached writes */
/** Do multi-page cached writes */
- unsigned big_writes : 1;
/** The number of requests waiting for completion */
atomic_t num_waiting;
/** The number of requests waiting for completion */
atomic_t num_waiting;
/*
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.
See the file COPYING.
This program can be distributed under the terms of the GNU GPL.
See the file COPYING.
unsigned rootmode;
unsigned user_id;
unsigned group_id;
unsigned rootmode;
unsigned user_id;
unsigned group_id;
- unsigned fd_present : 1;
- unsigned rootmode_present : 1;
- unsigned user_id_present : 1;
- unsigned group_id_present : 1;
+ unsigned fd_present:1;
+ unsigned rootmode_present:1;
+ unsigned user_id_present:1;
+ unsigned group_id_present:1;
unsigned flags;
unsigned max_read;
unsigned blksize;
unsigned flags;
unsigned max_read;
unsigned blksize;
fi = get_fuse_inode(inode);
spin_lock(&fc->lock);
fi = get_fuse_inode(inode);
spin_lock(&fc->lock);
spin_unlock(&fc->lock);
fuse_change_attributes(inode, attr, attr_valid, attr_version);
spin_unlock(&fc->lock);
fuse_change_attributes(inode, attr, attr_valid, attr_version);
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;
u32 generation;
};
u64 nodeid;
u32 generation;
};
static void fuse_inode_init_once(void *foo)
{
static void fuse_inode_init_once(void *foo)
{
- struct inode * inode = foo;
+ struct inode *inode = foo;
inode_init_once(inode);
}
inode_init_once(inode);
}
- 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);
INIT_LIST_HEAD(&fuse_conn_list);
FUSE_KERNEL_VERSION, FUSE_KERNEL_MINOR_VERSION);
INIT_LIST_HEAD(&fuse_conn_list);