Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 143354
b: refs/heads/master
c: 10d2198
h: refs/heads/master
v: v3
  • Loading branch information
Christoph Hellwig authored and Steven Whitehouse committed Apr 15, 2009
1 parent 75f1240 commit fadd0f5
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 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: a228df6339e0d385b8149c860d81b6007f5e9c81
refs/heads/master: 10d2198805d7faa2b193485446ff6b1de42c9b78
8 changes: 4 additions & 4 deletions trunk/fs/gfs2/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,15 @@ void gfs2_set_iop(struct inode *inode)
if (S_ISREG(mode)) {
inode->i_op = &gfs2_file_iops;
if (gfs2_localflocks(sdp))
inode->i_fop = gfs2_file_fops_nolock;
inode->i_fop = &gfs2_file_fops_nolock;
else
inode->i_fop = gfs2_file_fops;
inode->i_fop = &gfs2_file_fops;
} else if (S_ISDIR(mode)) {
inode->i_op = &gfs2_dir_iops;
if (gfs2_localflocks(sdp))
inode->i_fop = gfs2_dir_fops_nolock;
inode->i_fop = &gfs2_dir_fops_nolock;
else
inode->i_fop = gfs2_dir_fops;
inode->i_fop = &gfs2_dir_fops;
} else if (S_ISLNK(mode)) {
inode->i_op = &gfs2_symlink_iops;
} else {
Expand Down
14 changes: 8 additions & 6 deletions trunk/fs/gfs2/inode.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,21 +101,23 @@ void gfs2_dinode_print(const struct gfs2_inode *ip);
extern const struct inode_operations gfs2_file_iops;
extern const struct inode_operations gfs2_dir_iops;
extern const struct inode_operations gfs2_symlink_iops;
extern const struct file_operations *gfs2_file_fops_nolock;
extern const struct file_operations *gfs2_dir_fops_nolock;
extern const struct file_operations gfs2_file_fops_nolock;
extern const struct file_operations gfs2_dir_fops_nolock;

extern void gfs2_set_inode_flags(struct inode *inode);

#ifdef CONFIG_GFS2_FS_LOCKING_DLM
extern const struct file_operations *gfs2_file_fops;
extern const struct file_operations *gfs2_dir_fops;
extern const struct file_operations gfs2_file_fops;
extern const struct file_operations gfs2_dir_fops;

static inline int gfs2_localflocks(const struct gfs2_sbd *sdp)
{
return sdp->sd_args.ar_localflocks;
}
#else /* Single node only */
#define gfs2_file_fops NULL
#define gfs2_dir_fops NULL
#define gfs2_file_fops gfs2_file_fops_nolock
#define gfs2_dir_fops gfs2_dir_fops_nolock

static inline int gfs2_localflocks(const struct gfs2_sbd *sdp)
{
return 1;
Expand Down
8 changes: 4 additions & 4 deletions trunk/fs/gfs2/ops_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -705,7 +705,7 @@ static int gfs2_flock(struct file *file, int cmd, struct file_lock *fl)
}
}

const struct file_operations *gfs2_file_fops = &(const struct file_operations){
const struct file_operations gfs2_file_fops = {
.llseek = gfs2_llseek,
.read = do_sync_read,
.aio_read = generic_file_aio_read,
Expand All @@ -723,7 +723,7 @@ const struct file_operations *gfs2_file_fops = &(const struct file_operations){
.setlease = gfs2_setlease,
};

const struct file_operations *gfs2_dir_fops = &(const struct file_operations){
const struct file_operations gfs2_dir_fops = {
.readdir = gfs2_readdir,
.unlocked_ioctl = gfs2_ioctl,
.open = gfs2_open,
Expand All @@ -735,7 +735,7 @@ const struct file_operations *gfs2_dir_fops = &(const struct file_operations){

#endif /* CONFIG_GFS2_FS_LOCKING_DLM */

const struct file_operations *gfs2_file_fops_nolock = &(const struct file_operations){
const struct file_operations gfs2_file_fops_nolock = {
.llseek = gfs2_llseek,
.read = do_sync_read,
.aio_read = generic_file_aio_read,
Expand All @@ -751,7 +751,7 @@ const struct file_operations *gfs2_file_fops_nolock = &(const struct file_operat
.setlease = generic_setlease,
};

const struct file_operations *gfs2_dir_fops_nolock = &(const struct file_operations){
const struct file_operations gfs2_dir_fops_nolock = {
.readdir = gfs2_readdir,
.unlocked_ioctl = gfs2_ioctl,
.open = gfs2_open,
Expand Down

0 comments on commit fadd0f5

Please sign in to comment.