SOURCES (LINUX_2_6): kernel-squashfs.patch - updated for 2.6.25

zbyniu zbyniu at pld-linux.org
Thu May 8 01:32:21 CEST 2008


Author: zbyniu                       Date: Wed May  7 23:32:21 2008 GMT
Module: SOURCES                       Tag: LINUX_2_6
---- Log message:
- updated for 2.6.25

---- Files affected:
SOURCES:
   kernel-squashfs.patch (1.1.2.3 -> 1.1.2.4) 

---- Diffs:

================================================================
Index: SOURCES/kernel-squashfs.patch
diff -u SOURCES/kernel-squashfs.patch:1.1.2.3 SOURCES/kernel-squashfs.patch:1.1.2.4
--- SOURCES/kernel-squashfs.patch:1.1.2.3	Tue Feb 26 03:37:02 2008
+++ SOURCES/kernel-squashfs.patch	Thu May  8 01:32:15 2008
@@ -72,7 +72,7 @@
 diff -x .gitignore -Nurp linux-2.6.24/fs/squashfs/inode.c linux-2.6.24-squashfs3.3/fs/squashfs/inode.c
 --- linux-2.6.24/fs/squashfs/inode.c	1970-01-01 01:00:00.000000000 +0100
 +++ linux-2.6.24-squashfs3.3/fs/squashfs/inode.c	2007-11-01 05:05:00.000000000 +0000
-@@ -0,0 +1,2192 @@
+@@ -0,0 +1,2185 @@
 +/*
 + * Squashfs - a compressed read only filesystem for Linux
 + *
@@ -112,7 +112,6 @@
 +
 +int squashfs_cached_blks;
 +
-+static void vfs_read_inode(struct inode *i);
 +static struct dentry *squashfs_get_parent(struct dentry *child);
 +static int squashfs_read_inode(struct inode *i, squashfs_inode_t inode);
 +static int squashfs_statfs(struct dentry *, struct kstatfs *);
@@ -158,7 +157,6 @@
 +	.destroy_inode = squashfs_destroy_inode,
 +	.statfs = squashfs_statfs,
 +	.put_super = squashfs_put_super,
-+	.read_inode = vfs_read_inode
 +};
 +
 +static struct export_operations squashfs_export_ops = {
@@ -706,28 +704,21 @@
 +	return SQUASHFS_INVALID_BLK;
 +}
 +	
-+
-+static void vfs_read_inode(struct inode *i)
-+{
-+	struct squashfs_sb_info *msblk = i->i_sb->s_fs_info;
-+	squashfs_inode_t inode = squashfs_inode_lookup(i->i_sb, i->i_ino);
-+
-+	TRACE("Entered vfs_read_inode\n");
-+
-+	if(inode != SQUASHFS_INVALID_BLK)
-+		(msblk->read_inode)(i, inode);
-+}
-+
-+
 +static struct dentry *squashfs_get_parent(struct dentry *child)
 +{
 +	struct inode *i = child->d_inode;
-+	struct inode *parent = iget(i->i_sb, SQUASHFS_I(i)->u.s2.parent_inode);
++	unsigned long ino = SQUASHFS_I(i)->u.s2.parent_inode;
++	squashfs_inode_t inode = squashfs_inode_lookup(i->i_sb, ino);
++	struct inode *parent;
 +	struct dentry *rv;
 +
 +	TRACE("Entered squashfs_get_parent\n");
 +
-+	if(parent == NULL) {
++	if (inode == SQUASHFS_INVALID_BLK)
++		return ERR_PTR(-EINVAL);
++
++	parent = squashfs_iget(i->i_sb, inode, ino);
++	if (IS_ERR(parent)) {
 +		rv = ERR_PTR(-EACCES);
 +		goto out;
 +	}
@@ -740,7 +731,7 @@
 +	return rv;
 +}
 +
-+	
++
 +SQSH_EXTERN struct inode *squashfs_iget(struct super_block *s,
 +				squashfs_inode_t inode, unsigned int inode_number)
 +{
@@ -748,8 +739,10 @@
 +	struct inode *i = iget_locked(s, inode_number);
 +
 +	TRACE("Entered squashfs_iget\n");
++	if (!i)
++		return ERR_PTR(-ENOMEM);
 +
-+	if(i && (i->i_state & I_NEW)) {
++	if (i->i_state & I_NEW) {
 +		(msblk->read_inode)(i, inode);
 +		unlock_new_inode(i);
 +	}
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/kernel-squashfs.patch?r1=1.1.2.3&r2=1.1.2.4&f=u



More information about the pld-cvs-commit mailing list