Whamcloud - gitweb
LU-16518 llite: fix unused-but-set-variable warnings 78/58178/2
authorTimothy Day <timday@amazon.com>
Mon, 24 Feb 2025 01:47:17 +0000 (20:47 -0500)
committerOleg Drokin <green@whamcloud.com>
Thu, 6 Mar 2025 08:08:09 +0000 (08:08 +0000)
Remove unused variables in llite. Clang does not like
this, so disard them.

Test-Parameters: trivial
Signed-off-by: Timothy Day <timday@amazon.com>
Change-Id: Icb555135fc5ee53c2a7b2819beed4a78fe89b91d
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58178
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Max Wang <wamax@amazon.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/llite/llite_lib.c
lustre/llite/namei.c
lustre/llite/rw.c
lustre/llite/statahead.c

index 9ccf1bb..29228a7 100644 (file)
@@ -1043,7 +1043,7 @@ int ll_sbi_flags_seq_show(struct seq_file *m, void *v)
 static int ll_options(char *options, struct super_block *sb)
 {
        struct ll_sb_info *sbi = ll_s2sbi(sb);
-       char *s2, *s1, *opts, *orig_opts;
+       char *s1, *opts, *orig_opts;
        int err = 0;
 
        ENTRY;
@@ -1055,7 +1055,6 @@ static int ll_options(char *options, struct super_block *sb)
        if (!opts)
                RETURN(-ENOMEM);
        s1 = opts;
-       s2 = opts;
 
        CDEBUG(D_CONFIG, "Parsing opts %s\n", options);
 
index 738ca26..a7adafb 100644 (file)
@@ -1299,7 +1299,6 @@ static int ll_atomic_open(struct inode *dir, struct dentry *dentry,
 {
        struct lookup_intent *it;
        struct dentry *de;
-       long long lookup_flags = LOOKUP_OPEN;
        struct ll_sb_info *sbi = NULL;
        struct pcc_create_attach pca = { NULL, NULL };
        int open_threshold;
@@ -1343,7 +1342,6 @@ static int ll_atomic_open(struct inode *dir, struct dentry *dentry,
        it->it_op = IT_OPEN;
        if (open_flags & O_CREAT) {
                it->it_op |= IT_CREAT;
-               lookup_flags |= LOOKUP_CREATE;
                sbi = ll_i2sbi(dir);
                /* Volatile file is used for HSM restore, so do not use PCC */
                if (!filename_is_volatile(dentry->d_name.name,
index fc528ad..1b57497 100644 (file)
@@ -578,12 +578,10 @@ static int ll_readahead_file_kms(const struct lu_env *env,
                                struct cl_io *io, __u64 *kms)
 {
        struct cl_object *clob;
-       struct inode *inode;
        struct cl_attr *attr = vvp_env_new_attr(env);
        int ret;
 
        clob = io->ci_obj;
-       inode = vvp_object_inode(clob);
 
        cl_object_attr_lock(clob);
        ret = cl_object_attr_get(env, clob, attr);
index 64377d4..eaf02b1 100644 (file)
@@ -881,7 +881,6 @@ static int ll_statahead_interpret(struct md_op_item *item, int rc)
        struct ll_statahead_info *sai;
        struct mdt_body *body;
        struct inode *child;
-       __u64 handle = 0;
 
        ENTRY;
 
@@ -935,7 +934,6 @@ static int ll_statahead_interpret(struct md_op_item *item, int rc)
         * process enqueues lock on child with parent lock held, eg.
         * unlink.
         */
-       handle = it->it_lock_handle;
        ll_intent_drop_lock(it);
        ll_unlock_md_op_lsm(&item->mop_data);
 
@@ -1161,7 +1159,6 @@ static void ll_stop_agl(struct ll_statahead_info *sai)
 static void ll_start_agl(struct dentry *parent, struct ll_statahead_info *sai)
 {
        int node = cfs_cpt_spread_node(cfs_cpt_tab, CFS_CPT_ANY);
-       struct ll_inode_info *plli;
        struct task_struct *task;
 
        ENTRY;
@@ -1169,7 +1166,6 @@ static void ll_start_agl(struct dentry *parent, struct ll_statahead_info *sai)
        CDEBUG(D_READA, "start agl thread: sai %p, parent %pd\n",
               sai, parent);
 
-       plli = ll_i2info(parent->d_inode);
        task = kthread_create_on_node(ll_agl_thread, sai, node, "ll_agl_%d",
                                      sai->sai_pid);
        if (IS_ERR(task)) {