diff options
author | Raghavendra Bhat <raghavendrabhat@gluster.com> | 2011-04-07 07:10:42 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-04-07 11:40:20 -0700 |
commit | 19b2e01f1c53c358c5673c3d216c0349b55481a6 (patch) | |
tree | 40a5d6ae69d838d6c9a003f6e4d394a902355850 | |
parent | 4bf80aa399f70aa976796154728d518362708792 (diff) |
do not change the arguments of a function
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com>
Signed-off-by: Vijay Bellur <vijay@gluster.com>
BUG: 2685 (nfs server crashed in quota_check_limit)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2685
-rw-r--r-- | xlators/features/quota/src/quota.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c index 6400505add2..34b04a7530c 100644 --- a/xlators/features/quota/src/quota.c +++ b/xlators/features/quota/src/quota.c @@ -301,6 +301,8 @@ quota_check_limit (call_frame_t *frame, inode_t *inode, xlator_t *this, call_stub_t *stub = NULL; int32_t validate_count = 0, link_count = 0; uint64_t value = 0; + char *tmp_name = NULL; + ino_t tmp_par = 0; GF_VALIDATE_OR_GOTO ("quota", this, out); GF_VALIDATE_OR_GOTO (this->name, frame, out); @@ -318,6 +320,8 @@ quota_check_limit (call_frame_t *frame, inode_t *inode, xlator_t *this, inode_ctx_get (inode, this, &value); ctx = (quota_inode_ctx_t *)(unsigned long)value; + tmp_name = name; + tmp_par = par; _inode = inode_ref (inode); do { @@ -354,11 +358,11 @@ quota_check_limit (call_frame_t *frame, inode_t *inode, xlator_t *this, break; } - parent = inode_parent (_inode, par, name); + parent = inode_parent (_inode, tmp_par, tmp_name); - if (name != NULL) { - name = NULL; - par = 0; + if (tmp_name != NULL) { + tmp_name = NULL; + tmp_par = 0; } inode_unref (_inode); @@ -389,11 +393,6 @@ out: validate: LOCK (&local->lock); { - if (local->stub == NULL) { - local->stub = stub; - } - - local->delta = delta; loc_wipe (&local->validate_loc); local->validate_count++; quota_inode_loc_fill (_inode, &local->validate_loc); |