Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused code from posix #4455

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

pranithk
Copy link
Member

These two variables were helpful before io-stats was available. Now these are not as useful as io-stats. So removing this unnecessary code.

Change-Id: Iddc0ad51a77da84bca0f66040e3bf2f58c5b8339

@gluster-ant
Copy link
Collaborator

CLANG-FORMAT FAILURE:
Before merging the patch, this diff needs to be considered for passing clang-format

index 0a8ef7576..2a65c3156 100644
--- a/xlators/storage/posix/src/posix-inode-fd-ops.c
+++ b/xlators/storage/posix/src/posix-inode-fd-ops.c
@@ -5876,7 +5876,8 @@ posix_readdirp_fill(xlator_t *this, fd_t *fd, gf_dirent_t *entries,
             ret = posix_pstat(this, inode, inode->gfid, hpath, &stbuf,
                               _gf_false, _gf_true);
         else
-            ret = posix_pstat(this, inode, zero_gfid, hpath, &stbuf, _gf_false, _gf_true);
+            ret = posix_pstat(this, inode, zero_gfid, hpath, &stbuf, _gf_false,
+                              _gf_true);
 
         if (ret == -1) {
             if (inode)
@@ -6018,10 +6019,7 @@ posix_readdirp(call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
         if (op_ret >= 0) {
             op_ret = 0;
 
-            list_for_each_entry(entry, &entries.list, list)
-            {
-                op_ret++;
-            }
+            list_for_each_entry(entry, &entries.list, list) { op_ret++; }
         }
 
         STACK_UNWIND_STRICT(readdirp, frame, op_ret, op_errno, &entries, NULL);

These two variables were helpful before io-stats was available.
Now these are not as useful as io-stats. So removing this unnecessary
code.

Change-Id: Iddc0ad51a77da84bca0f66040e3bf2f58c5b8339
Signed-off-by: Pranith Kumar Karampuri <[email protected]>
@gluster-ant
Copy link
Collaborator

CLANG-FORMAT FAILURE:
Before merging the patch, this diff needs to be considered for passing clang-format

index 575f2934b..2a65c3156 100644
--- a/xlators/storage/posix/src/posix-inode-fd-ops.c
+++ b/xlators/storage/posix/src/posix-inode-fd-ops.c
@@ -6019,10 +6019,7 @@ posix_readdirp(call_frame_t *frame, xlator_t *this, fd_t *fd, size_t size,
         if (op_ret >= 0) {
             op_ret = 0;
 
-            list_for_each_entry(entry, &entries.list, list)
-            {
-                op_ret++;
-            }
+            list_for_each_entry(entry, &entries.list, list) { op_ret++; }
         }
 
         STACK_UNWIND_STRICT(readdirp, frame, op_ret, op_errno, &entries, NULL);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants