Skip to content

Commit

Permalink
[GFS2] More code style updates
Browse files Browse the repository at this point in the history
As per Jan Engelhardt's fifth email. This has most of the changes
recommended, which is the removal of casts which are not required,
some indenting fixes and similar.

Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
  • Loading branch information
Steven Whitehouse committed Sep 4, 2006
1 parent 0bd5996 commit 26c1a57
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 33 deletions.
60 changes: 30 additions & 30 deletions fs/gfs2/ops_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,12 +94,12 @@ static int gfs2_read_actor(read_descriptor_t *desc, struct page *page,

kaddr = kmap(page);
memcpy(desc->arg.buf, kaddr + offset, size);
kunmap(page);
kunmap(page);

desc->count = count - size;
desc->written += size;
desc->arg.buf += size;
return size;
desc->count = count - size;
desc->written += size;
desc->arg.buf += size;
return size;
}

int gfs2_internal_read(struct gfs2_inode *ip, struct file_ra_state *ra_state,
Expand Down Expand Up @@ -700,7 +700,7 @@ static int do_flock(struct file *file, int cmd, struct file_lock *fl)
int error = 0;

state = (fl->fl_type == F_WRLCK) ? LM_ST_EXCLUSIVE : LM_ST_SHARED;
flags = ((IS_SETLKW(cmd)) ? 0 : LM_FLAG_TRY) | GL_EXACT | GL_NOCACHE;
flags = (IS_SETLKW(cmd) ? 0 : LM_FLAG_TRY) | GL_EXACT | GL_NOCACHE;

mutex_lock(&fp->f_fl_mutex);

Expand Down Expand Up @@ -780,32 +780,32 @@ static int gfs2_flock(struct file *file, int cmd, struct file_lock *fl)
}

const struct file_operations gfs2_file_fops = {
.llseek = gfs2_llseek,
.read = generic_file_read,
.readv = generic_file_readv,
.aio_read = generic_file_aio_read,
.write = generic_file_write,
.writev = generic_file_writev,
.aio_write = generic_file_aio_write,
.unlocked_ioctl = gfs2_ioctl,
.mmap = gfs2_mmap,
.open = gfs2_open,
.release = gfs2_close,
.fsync = gfs2_fsync,
.lock = gfs2_lock,
.sendfile = generic_file_sendfile,
.flock = gfs2_flock,
.splice_read = generic_file_splice_read,
.splice_write = generic_file_splice_write,
.llseek = gfs2_llseek,
.read = generic_file_read,
.readv = generic_file_readv,
.aio_read = generic_file_aio_read,
.write = generic_file_write,
.writev = generic_file_writev,
.aio_write = generic_file_aio_write,
.unlocked_ioctl = gfs2_ioctl,
.mmap = gfs2_mmap,
.open = gfs2_open,
.release = gfs2_close,
.fsync = gfs2_fsync,
.lock = gfs2_lock,
.sendfile = generic_file_sendfile,
.flock = gfs2_flock,
.splice_read = generic_file_splice_read,
.splice_write = generic_file_splice_write,
};

const struct file_operations gfs2_dir_fops = {
.readdir = gfs2_readdir,
.unlocked_ioctl = gfs2_ioctl,
.open = gfs2_open,
.release = gfs2_close,
.fsync = gfs2_fsync,
.lock = gfs2_lock,
.flock = gfs2_flock,
.readdir = gfs2_readdir,
.unlocked_ioctl = gfs2_ioctl,
.open = gfs2_open,
.release = gfs2_close,
.fsync = gfs2_fsync,
.lock = gfs2_lock,
.flock = gfs2_flock,
};

4 changes: 2 additions & 2 deletions fs/gfs2/ops_fstype.c
Original file line number Diff line number Diff line change
Expand Up @@ -791,7 +791,7 @@ static int gfs2_get_sb(struct file_system_type *fs_type, int flags,
if (error)
goto out;
sb = mnt->mnt_sb;
sdp = (struct gfs2_sbd*)sb->s_fs_info;
sdp = sb->s_fs_info;
sdp->sd_gfs2mnt = mnt;
out:
return error;
Expand Down Expand Up @@ -832,7 +832,7 @@ static int set_bdev_super(struct super_block *s, void *data)

static int test_bdev_super(struct super_block *s, void *data)
{
return (void *)s->s_bdev == data;
return s->s_bdev == data;
}

static struct super_block* get_gfs2_sb(const char *dev_name)
Expand Down
2 changes: 1 addition & 1 deletion fs/gfs2/ops_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1014,7 +1014,7 @@ static int gfs2_setattr(struct dentry *dentry, struct iattr *attr)

/**
* gfs2_getattr - Read out an inode's attributes
* @mnt: ?
* @mnt: The vfsmount the inode is being accessed from
* @dentry: The dentry to stat
* @stat: The inode's stats
*
Expand Down

0 comments on commit 26c1a57

Please sign in to comment.