summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2010-04-22 06:12:00 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-05-25 23:31:41 -0700
commit6928e964dda7a51e85d17e8b91b0b11427107e2e (patch)
tree0a23474feb700767039cf04327bc56280ee50e55 /xlators
parent8e455dd63ede774f99b0d5c5e5832c0550d00dcf (diff)
stat-prefetch: Remove checks for loc->parent
..because loc->parent can be NULL for the root inode. Having this check makes sp return EINVAL on perfectly valid fops. Signed-off-by: Shehjar Tikoo <shehjart@gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 854 (nfs server didn't start) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=854
Diffstat (limited to 'xlators')
-rw-r--r--xlators/performance/stat-prefetch/src/stat-prefetch.c32
1 files changed, 0 insertions, 32 deletions
diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.c b/xlators/performance/stat-prefetch/src/stat-prefetch.c
index ef2fc43..a9adcbf 100644
--- a/xlators/performance/stat-prefetch/src/stat-prefetch.c
+++ b/xlators/performance/stat-prefetch/src/stat-prefetch.c
@@ -1436,8 +1436,6 @@ sp_create (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc, out, op_errno,
EINVAL);
- GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->parent, out,
- op_errno, EINVAL);
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->path, out, op_errno,
EINVAL);
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->name, out, op_errno,
@@ -1626,8 +1624,6 @@ sp_mkdir (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode)
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc, out, op_errno,
EINVAL);
- GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->parent, out,
- op_errno, EINVAL);
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->path, out, op_errno,
EINVAL);
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->name, out, op_errno,
@@ -1689,8 +1685,6 @@ sp_mknod (call_frame_t *frame, xlator_t *this, loc_t *loc, mode_t mode,
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc, out, op_errno,
EINVAL);
- GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->parent, out,
- op_errno, EINVAL);
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->path, out, op_errno,
EINVAL);
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->name, out, op_errno,
@@ -1752,8 +1746,6 @@ sp_symlink (call_frame_t *frame, xlator_t *this, const char *linkpath,
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc, out, op_errno,
EINVAL);
- GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->parent, out,
- op_errno, EINVAL);
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->path, out, op_errno,
EINVAL);
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->name, out, op_errno,
@@ -1867,8 +1859,6 @@ sp_link (call_frame_t *frame, xlator_t *this, loc_t *oldloc, loc_t *newloc)
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, newloc, out, op_errno,
EINVAL);
- GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, newloc->parent, out,
- op_errno, EINVAL);
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, newloc->path, out,
op_errno, EINVAL);
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, newloc->name, out,
@@ -1876,8 +1866,6 @@ sp_link (call_frame_t *frame, xlator_t *this, loc_t *oldloc, loc_t *newloc)
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, newloc->inode, out,
op_errno, EINVAL);
- GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, oldloc->parent, out,
- op_errno, EINVAL);
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, oldloc->name, out,
op_errno, EINVAL);
@@ -1973,8 +1961,6 @@ sp_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc, off_t offset)
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc, out, op_errno,
EINVAL);
- GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->parent, out,
- op_errno, EINVAL);
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->name, out, op_errno,
EINVAL);
@@ -2109,8 +2095,6 @@ sp_setattr (call_frame_t *frame, xlator_t *this,
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc, out, op_errno,
EINVAL);
- GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->parent, out,
- op_errno, EINVAL);
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->name, out, op_errno,
EINVAL);
@@ -2208,8 +2192,6 @@ sp_readlink (call_frame_t *frame, xlator_t *this, loc_t *loc, size_t size)
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc, out, op_errno,
EINVAL);
- GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->parent, out,
- op_errno, EINVAL);
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->name, out,
op_errno, EINVAL);
@@ -2317,8 +2299,6 @@ sp_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc)
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc, out, op_errno,
EINVAL);
- GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->parent, out,
- op_errno, EINVAL);
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->name, out, op_errno,
EINVAL);
@@ -2439,8 +2419,6 @@ sp_rmdir (call_frame_t *frame, xlator_t *this, loc_t *loc)
EINVAL);
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->inode, out,
op_errno, EINVAL);
- GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->parent, out,
- op_errno, EINVAL);
sp_remove_caches_from_all_fds_opened (this, loc->inode);
@@ -2718,8 +2696,6 @@ sp_rename (call_frame_t *frame, xlator_t *this, loc_t *oldloc,loc_t *newloc)
op_errno, EINVAL);
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, oldloc->name, out,
op_errno, EINVAL);
- GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, oldloc->parent, out,
- op_errno, EINVAL);
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, oldloc->inode, out,
op_errno, EINVAL);
@@ -2891,8 +2867,6 @@ sp_setxattr (call_frame_t *frame, xlator_t *this, loc_t *loc, dict_t *dict,
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc, out, op_errno,
EINVAL);
- GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->parent, out,
- op_errno, EINVAL);
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->name, out, op_errno,
EINVAL);
@@ -2982,8 +2956,6 @@ sp_removexattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc, out, op_errno,
EINVAL);
- GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->parent, out,
- op_errno, EINVAL);
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->name, out, op_errno,
EINVAL);
@@ -3302,8 +3274,6 @@ sp_checksum (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flag)
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc, out, op_errno,
EINVAL);
- GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->parent, out,
- op_errno, EINVAL);
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->name, out,
op_errno, EINVAL);
@@ -3401,8 +3371,6 @@ sp_xattrop (call_frame_t *frame, xlator_t *this, loc_t *loc,
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc, out, op_errno,
EINVAL);
- GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->parent, out,
- op_errno, EINVAL);
GF_VALIDATE_OR_GOTO_WITH_ERROR (this->name, loc->name, out, op_errno,
EINVAL);