diff options
| author | Vikas Gorur <vikas@gluster.com> | 2009-10-05 05:38:09 +0000 | 
|---|---|---|
| committer | Anand V. Avati <avati@dev.gluster.com> | 2009-10-05 05:16:58 -0700 | 
| commit | f719a641841a2bbd6f59945e5e32350cfe89f814 (patch) | |
| tree | c941c39d5e4731ba95716b056eae267ef49a5fd1 | |
| parent | 965b74d7d6faeebb17f580cefcadca15dece3b08 (diff) | |
features/locks: Change STACK_UNWIND to STACK_UNWIND_STRICT.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 269 (Add a specialized STACK_UNWIND macro for each FOP)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=269
| -rw-r--r-- | xlators/features/locks/src/entrylk.c | 6 | ||||
| -rw-r--r-- | xlators/features/locks/src/inodelk.c | 4 | ||||
| -rw-r--r-- | xlators/features/locks/src/posix.c | 31 | 
3 files changed, 22 insertions, 19 deletions
diff --git a/xlators/features/locks/src/entrylk.c b/xlators/features/locks/src/entrylk.c index 383335977..cb6a150f8 100644 --- a/xlators/features/locks/src/entrylk.c +++ b/xlators/features/locks/src/entrylk.c @@ -360,7 +360,7 @@ grant_blocked_entry_locks (xlator_t *this, pl_inode_t *pl_inode,  	list_for_each_entry_safe (lock, tmp, &granted_list, blocked_locks) {  		list_del_init (&lock->blocked_locks); -		STACK_UNWIND (lock->frame, 0, 0); +		STACK_UNWIND_STRICT (entrylk, lock->frame, 0, 0);  		FREE (lock->basename);  		FREE (lock); @@ -417,7 +417,7 @@ unlock:  	list_for_each_entry_safe (lock, tmp, &granted, blocked_locks) {  		list_del_init (&lock->blocked_locks); -		STACK_UNWIND (lock->frame, 0, 0); +		STACK_UNWIND_STRICT (entrylk, lock->frame, 0, 0);  		if (lock->basename)  			FREE (lock->basename); @@ -535,7 +535,7 @@ pl_common_entrylk (call_frame_t *frame, xlator_t *this,  	op_ret = 0;  out:  	if (unwind) { -		STACK_UNWIND (frame, op_ret, op_errno); +		STACK_UNWIND_STRICT (entrylk, frame, op_ret, op_errno);  	}  	return 0; diff --git a/xlators/features/locks/src/inodelk.c b/xlators/features/locks/src/inodelk.c index 9885de5e0..6e95ec6e8 100644 --- a/xlators/features/locks/src/inodelk.c +++ b/xlators/features/locks/src/inodelk.c @@ -269,7 +269,7 @@ __grant_blocked_inode_locks (xlator_t *this, pl_inode_t *pl_inode, pl_dom_list_t                                  bl->user_flock.l_start,                                  bl->user_flock.l_len); -                        STACK_UNWIND (bl->frame, 0, 0, &bl->user_flock); +                        STACK_UNWIND_STRICT (inodelk, bl->frame, 0, 0);                  }          }  	return; @@ -525,7 +525,7 @@ pl_common_inodelk (call_frame_t *frame, xlator_t *this,  	op_ret = 0;  unwind: -	STACK_UNWIND (frame, op_ret, op_errno); +	STACK_UNWIND_STRICT (inodelk, frame, op_ret, op_errno);  out:  	return 0;  } diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c index c77d607b6..347c17455 100644 --- a/xlators/features/locks/src/posix.c +++ b/xlators/features/locks/src/posix.c @@ -68,7 +68,8 @@ pl_truncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this,  	if (local->op == TRUNCATE)  		loc_wipe (&local->loc); -	STACK_UNWIND (frame, op_ret, op_errno, prebuf, postbuf); +	STACK_UNWIND_STRICT (truncate, frame, op_ret, op_errno, +                             prebuf, postbuf);  	return 0;  } @@ -166,7 +167,7 @@ unwind:  	if (local->op == TRUNCATE)  		loc_wipe (&local->loc); -	STACK_UNWIND (frame, op_ret, op_errno, buf, NULL); +	STACK_UNWIND_STRICT (truncate, frame, op_ret, op_errno, buf, NULL);  	return 0;  } @@ -196,7 +197,7 @@ pl_truncate (call_frame_t *frame, xlator_t *this,  	return 0;  unwind: -	STACK_UNWIND (frame, -1, ENOMEM, NULL, NULL); +	STACK_UNWIND_STRICT (truncate, frame, -1, ENOMEM, NULL, NULL);  	return 0;  } @@ -226,7 +227,7 @@ pl_ftruncate (call_frame_t *frame, xlator_t *this,  	return 0;  unwind: -	STACK_UNWIND (frame, -1, ENOMEM, NULL, NULL); +	STACK_UNWIND_STRICT (ftruncate, frame, -1, ENOMEM, NULL, NULL);  	return 0;  } @@ -257,7 +258,7 @@ int  pl_flush_cbk (call_frame_t *frame, void *cookie, xlator_t *this,  	      int32_t op_ret, int32_t op_errno)  { -	STACK_UNWIND (frame, op_ret, op_errno); +	STACK_UNWIND_STRICT (flush, frame, op_ret, op_errno);  	return 0;  } @@ -276,7 +277,7 @@ pl_flush (call_frame_t *frame, xlator_t *this,  	if (!pl_inode) {  		gf_log (this->name, GF_LOG_DEBUG, "Could not get inode."); -		STACK_UNWIND (frame, -1, EBADFD); +		STACK_UNWIND_STRICT (flush, frame, -1, EBADFD);  		return 0;  	} @@ -301,7 +302,7 @@ int  pl_open_cbk (call_frame_t *frame, void *cookie, xlator_t *this,  	     int32_t op_ret, int32_t op_errno, fd_t *fd)  { -	STACK_UNWIND (frame, op_ret, op_errno, fd); +	STACK_UNWIND_STRICT (open, frame, op_ret, op_errno, fd);  	return 0;  } @@ -326,8 +327,8 @@ pl_create_cbk (call_frame_t *frame, void *cookie,  	       fd_t *fd, inode_t *inode, struct stat *buf,                 struct stat *preparent, struct stat *postparent)  { -	STACK_UNWIND (frame, op_ret, op_errno, fd, inode, buf, -                      preparent, postparent); +	STACK_UNWIND_STRICT (create, frame, op_ret, op_errno, fd, inode, buf, +                             preparent, postparent);  	return 0;  } @@ -350,7 +351,8 @@ pl_readv_cbk (call_frame_t *frame, void *cookie, xlator_t *this,  	      struct iovec *vector, int32_t count, struct stat *stbuf,                struct iobref *iobref)  { -	STACK_UNWIND (frame, op_ret, op_errno, vector, count, stbuf, iobref); +	STACK_UNWIND_STRICT (readv, frame, op_ret, op_errno, +                             vector, count, stbuf, iobref);  	return 0;  } @@ -360,7 +362,7 @@ pl_writev_cbk (call_frame_t *frame, void *cookie, xlator_t *this,  	       int32_t op_ret, int32_t op_errno, struct stat *prebuf,                 struct stat *postbuf)  { -	STACK_UNWIND (frame, op_ret, op_errno, prebuf, postbuf); +	STACK_UNWIND_STRICT (writev, frame, op_ret, op_errno, prebuf, postbuf);  	return 0;  } @@ -503,7 +505,8 @@ pl_readv (call_frame_t *frame, xlator_t *this,          }  	if (op_ret == -1) -		STACK_UNWIND (frame, -1, op_errno, NULL, 0, NULL, NULL); +		STACK_UNWIND_STRICT (readv, frame, -1, op_errno, +                                     NULL, 0, NULL, NULL);  	return 0;  } @@ -597,7 +600,7 @@ pl_writev (call_frame_t *frame, xlator_t *this, fd_t *fd,                              fd, vector, count, offset, iobref);  	if (op_ret == -1) -		STACK_UNWIND (frame, -1, op_errno, NULL, NULL); +		STACK_UNWIND_STRICT (writev, frame, -1, op_errno, NULL, NULL);  	return 0;  } @@ -683,7 +686,7 @@ pl_lk (call_frame_t *frame, xlator_t *this,  	}  unwind: -	STACK_UNWIND (frame, op_ret, op_errno, flock); +	STACK_UNWIND_STRICT (lk, frame, op_ret, op_errno, flock);  out:  	return 0;  }  | 
