summaryrefslogtreecommitdiffstats
path: root/xlators/features/locks/src/posix.c
diff options
context:
space:
mode:
authorVikas Gorur <vikas@zresearch.com>2009-02-27 02:14:15 +0530
committerAnand V. Avati <avati@amp.gluster.com>2009-02-27 02:36:04 +0530
commit2dbcb3c79338dc4f4c45c21e4bf62e61e455ae19 (patch)
tree42ce3c02dc2f8adf741ee505ef21dae85a9f715a /xlators/features/locks/src/posix.c
parentf097e77ffb386dc73e3639af4a9cd57df0d3d40d (diff)
reverting nested locks in posix-locks for inodelk
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'xlators/features/locks/src/posix.c')
-rw-r--r--xlators/features/locks/src/posix.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c
index c2fee4d58..46d2cb9a0 100644
--- a/xlators/features/locks/src/posix.c
+++ b/xlators/features/locks/src/posix.c
@@ -1,5 +1,5 @@
/*
- Copyright (c) 2006-2009 Z RESEARCH, Inc. <http://www.zresearch.com>
+ Copyright (c) 2006, 2007, 2008 Z RESEARCH, Inc. <http://www.zresearch.com>
This file is part of GlusterFS.
GlusterFS is free software; you can redistribute it and/or modify
@@ -277,6 +277,7 @@ pl_flush (call_frame_t *frame, xlator_t *this,
priv = this->private;
pl_inode = pl_inode_get (this, fd->inode);
+
if (!pl_inode) {
gf_log (this->name, GF_LOG_ERROR, "returning EBADFD");
STACK_UNWIND (frame, -1, EBADFD);
@@ -443,7 +444,6 @@ pl_readv (call_frame_t *frame, xlator_t *this,
priv = this->private;
-
pl_inode = pl_inode_get (this, fd->inode);
if (priv->mandatory && pl_inode->mandatory) {
@@ -537,8 +537,8 @@ pl_writev (call_frame_t *frame, xlator_t *this, fd_t *fd,
priv = this->private;
-
pl_inode = pl_inode_get (this, fd->inode);
+
if (priv->mandatory && pl_inode->mandatory) {
region.fl_start = offset;
region.fl_end = offset + iov_length (vector, count) - 1;
@@ -719,7 +719,7 @@ pl_forget (xlator_t *this,
"Pending entry locks found!");
}
- FREE (pl_inode);
+ FREE (pl_inode);
return 0;
}