Whamcloud - gitweb
LU-17556 llite: removed dead branches 90/54090/3
authorShaun Tancheff <shaun.tancheff@hpe.com>
Mon, 19 Feb 2024 07:53:07 +0000 (14:53 +0700)
committerOleg Drokin <green@whamcloud.com>
Tue, 2 Apr 2024 21:02:03 +0000 (21:02 +0000)
A few cases disabled branches:
   if (0 && ...

Code disabled for many years should be removed.

Fixes: 39f63cf54c6 ("LU-4476 kernel: support process namespace containers")
Fixes: 99727c7a1a4 ("LU-4017 quota: add setting/getting project id function")
Fixes: c3e10ade1ee ("Moved IAM code from ldiskfs to OSD.")
Test-Parameters: trivial
Signed-off-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Change-Id: I8f7ba09881d66845acea9fdf24f499fb7b5366fa
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/54090
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Arshad Hussain <arshad.hussain@aeoncomputing.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Timothy Day <timday@amazon.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/vvp_object.c
lustre/osd-ldiskfs/osd_iam_lvar.c

index 0b9e23a..b03ba1f 100644 (file)
@@ -112,13 +112,8 @@ static int vvp_attr_update(const struct lu_env *env, struct cl_object *obj,
                inode_set_mtime(inode, attr->cat_mtime, 0);
        if (valid & CAT_CTIME)
                inode_set_ctime(inode, attr->cat_ctime, 0);
-       if (0 && valid & CAT_SIZE)
-               i_size_write(inode, attr->cat_size);
        if (valid & CAT_PROJID)
                ll_i2info(inode)->lli_projid = attr->cat_projid;
-       /* not currently necessary */
-       if (0 && valid & (CAT_UID|CAT_GID|CAT_SIZE|CAT_PROJID))
-               mark_inode_dirty(inode);
        return 0;
 }
 
index ac07523..41eb921 100644 (file)
@@ -333,18 +333,6 @@ static int n_invariant(const struct iam_leaf *leaf)
                        BREAKPOINT();
                        return 0;
                }
-               if (0 && nexthash < starthash) {
-                       /*
-                        * Unfortunately this useful invariant cannot be
-                        * reliably checked as parent node is not necessarily
-                        * locked.
-                        */
-                       n_print(leaf);
-                       CERROR("invalid hash value less than start hash: %#x < %#x\n",
-                               nexthash, starthash);
-                       dump_stack();
-                       return 0;
-               }
                if (nexthash < hash) {
                        BREAKPOINT();
                        return 0;