[GFS2] Remove lock methods for lock_nolock protocol
GFS2 supports two modes of locking - lock_nolock for single node filesystem and lock_dlm for cluster mode locking. The gfs2 lock methods are removed from file operation table for lock_nolock protocol. This would allow VFS to handle posix lock and flock logics just like other in-tree filesystems without duplication. Signed-off-by: S. Wendy Cheng <wcheng@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
This commit is contained in:

committed by
Steven Whitehouse

parent
bcd405599f
commit
c97bfe4351
@@ -131,14 +131,21 @@ static struct inode *gfs2_iget_skip(struct super_block *sb,
|
||||
|
||||
void gfs2_set_iop(struct inode *inode)
|
||||
{
|
||||
struct gfs2_sbd *sdp = GFS2_SB(inode);
|
||||
umode_t mode = inode->i_mode;
|
||||
|
||||
if (S_ISREG(mode)) {
|
||||
inode->i_op = &gfs2_file_iops;
|
||||
inode->i_fop = &gfs2_file_fops;
|
||||
if (sdp->sd_args.ar_localflocks)
|
||||
inode->i_fop = &gfs2_file_fops_nolock;
|
||||
else
|
||||
inode->i_fop = &gfs2_file_fops;
|
||||
} else if (S_ISDIR(mode)) {
|
||||
inode->i_op = &gfs2_dir_iops;
|
||||
inode->i_fop = &gfs2_dir_fops;
|
||||
if (sdp->sd_args.ar_localflocks)
|
||||
inode->i_fop = &gfs2_dir_fops_nolock;
|
||||
else
|
||||
inode->i_fop = &gfs2_dir_fops;
|
||||
} else if (S_ISLNK(mode)) {
|
||||
inode->i_op = &gfs2_symlink_iops;
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user