lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.61.0609011445580.15283@yvahk01.tjqt.qr>
Date:	Fri, 1 Sep 2006 14:50:10 +0200 (MEST)
From:	Jan Engelhardt <jengelh@...ux01.gwdg.de>
To:	Josef Sipek <jsipek@...sunysb.edu>
cc:	linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org,
	hch@...radead.org, akpm@...l.org, viro@....linux.org.uk
Subject: Re: [PATCH 04/22][RFC] Unionfs: Common file operations


>+	if (!d_deleted(dentry) &&
>+	    ((sbgen > fgen) || (dbstart(dentry) != fbstart(file)))) {

(sbgen > fgen || dbstart(dentry) != fbstart(file)) should suffice. (Read:
reduce the amount of "()" depth.)

>+int unionfs_file_release(struct inode *inode, struct file *file)
>+{
>+	int err = 0;
>+	struct file *hidden_file = NULL;
>+	int bindex, bstart, bend;
>+	int fgen;
>+
>+	/* fput all the hidden files */
>+	fgen = atomic_read(&ftopd(file)->ufi_generation);
>+	bstart = fbstart(file);
>+	bend = fbend(file);
>+
>+	for (bindex = bstart; bindex <= bend; bindex++) {
>+		hidden_file = ftohf_index(file, bindex);
>+
>+		if (hidden_file) {
>+			fput(hidden_file);
>+			unionfs_read_lock(inode->i_sb);
>+			branchput(inode->i_sb, bindex);
>+			unionfs_read_unlock(inode->i_sb);
>+		}
>+	}
>+	kfree(ftohf_ptr(file));
>+
>+	if (ftopd(file)->rdstate) {
>+		ftopd(file)->rdstate->uds_access = jiffies;
>+		printk(KERN_DEBUG "Saving rdstate with cookie %u [%d.%lld]\n",
>+		       ftopd(file)->rdstate->uds_cookie,
>+		       ftopd(file)->rdstate->uds_bindex,
>+		       (long long)ftopd(file)->rdstate->uds_dirpos);
>+		spin_lock(&itopd(inode)->uii_rdlock);
>+		itopd(inode)->uii_rdcount++;
>+		list_add_tail(&ftopd(file)->rdstate->uds_cache,
>+			      &itopd(inode)->uii_readdircache);
>+		mark_inode_dirty(inode);
>+		spin_unlock(&itopd(inode)->uii_rdlock);
>+		ftopd(file)->rdstate = NULL;
>+	}
>+	kfree(ftopd(file));
>+	return err;
>+}

"err" is unused in this function. Rid it.

>+			}
>+		}
>+
>+	}



Jan Engelhardt
-- 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ