Author: hawk                         Date: Thu Oct 23 20:40:18 2008 GMT
Module: SOURCES                       Tag: CRI
---- Log message:
- updated to 3.4 for 2.6.27.x

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

---- Diffs:

================================================================
Index: SOURCES/kernel-CRI-squashfs.patch
diff -u SOURCES/kernel-CRI-squashfs.patch:1.1.2.2 
SOURCES/kernel-CRI-squashfs.patch:1.1.2.3
--- SOURCES/kernel-CRI-squashfs.patch:1.1.2.2   Thu May  8 18:59:10 2008
+++ SOURCES/kernel-CRI-squashfs.patch   Thu Oct 23 22:40:12 2008
@@ -1,15 +1,15 @@
-diff -urN linux-2.6.25.orig/fs/Kconfig linux-2.6.25/fs/Kconfig
---- linux-2.6.25.orig/fs/Kconfig       2008-04-17 04:49:44.000000000 +0200
-+++ linux-2.6.25/fs/Kconfig    2008-04-29 13:25:27.000000000 +0200
-@@ -1367,6 +1367,56 @@
+diff -x .gitignore -Nurp linux-2.6.27-rc4-next/fs/Kconfig 
linux-2.6.27-rc4-next-squashfs3.4/fs/Kconfig
+--- linux-2.6.27-rc4-next/fs/Kconfig   2008-08-20 02:17:13.000000000 +0100
++++ linux-2.6.27-rc4-next-squashfs3.4/fs/Kconfig       2008-08-20 
04:15:06.000000000 +0100
+@@ -1356,6 +1356,56 @@ config CRAMFS
  
          If unsure, say N.
  
 +config SQUASHFS
-+      tristate "SquashFS 3.3 - Squashed file system support"
++      tristate "SquashFS 3.4 - Squashed file system support"
 +      select ZLIB_INFLATE
 +      help
-+        Saying Y here includes support for SquashFS 3.3 (a Compressed
++        Saying Y here includes support for SquashFS 3.4 (a Compressed
 +        Read-Only File System).  Squashfs is a highly compressed read-only
 +        filesystem for Linux.  It uses zlib compression to compress both
 +        files, inodes and directories.  Inodes in the system are very small
@@ -58,10 +58,10 @@
  config VXFS_FS
        tristate "FreeVxFS file system support (VERITAS VxFS(TM) compatible)"
        depends on BLOCK
-diff -urN linux-2.6.25.orig/fs/Makefile linux-2.6.25/fs/Makefile
---- linux-2.6.25.orig/fs/Makefile      2008-04-17 04:49:44.000000000 +0200
-+++ linux-2.6.25/fs/Makefile   2008-04-29 13:25:27.000000000 +0200
-@@ -73,6 +73,7 @@
+diff -x .gitignore -Nurp linux-2.6.27-rc4-next/fs/Makefile 
linux-2.6.27-rc4-next-squashfs3.4/fs/Makefile
+--- linux-2.6.27-rc4-next/fs/Makefile  2008-08-20 02:17:14.000000000 +0100
++++ linux-2.6.27-rc4-next-squashfs3.4/fs/Makefile      2008-08-20 
04:15:06.000000000 +0100
+@@ -75,6 +75,7 @@ obj-$(CONFIG_JBD)            += jbd/
  obj-$(CONFIG_JBD2)            += jbd2/
  obj-$(CONFIG_EXT2_FS)         += ext2/
  obj-$(CONFIG_CRAMFS)          += cramfs/
@@ -69,14 +69,14 @@
  obj-y                         += ramfs/
  obj-$(CONFIG_HUGETLBFS)               += hugetlbfs/
  obj-$(CONFIG_CODA_FS)         += coda/
-diff -urN linux-2.6.25.orig/fs/squashfs/inode.c 
linux-2.6.25/fs/squashfs/inode.c
---- linux-2.6.25.orig/fs/squashfs/inode.c      1970-01-01 01:00:00.000000000 
+0100
-+++ linux-2.6.25/fs/squashfs/inode.c   2008-04-29 13:25:27.000000000 +0200
-@@ -0,0 +1,2158 @@
+diff -x .gitignore -Nurp linux-2.6.27-rc4-next/fs/squashfs/inode.c 
linux-2.6.27-rc4-next-squashfs3.4/fs/squashfs/inode.c
+--- linux-2.6.27-rc4-next/fs/squashfs/inode.c  1970-01-01 01:00:00.000000000 
+0100
++++ linux-2.6.27-rc4-next-squashfs3.4/fs/squashfs/inode.c      2008-08-26 
08:25:34.000000000 +0100
+@@ -0,0 +1,2157 @@
 +/*
 + * Squashfs - a compressed read only filesystem for Linux
 + *
-+ * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007
++ * Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008
 + * Phillip Lougher <[EMAIL PROTECTED]>
 + *
 + * This program is free software; you can redistribute it and/or
@@ -103,17 +103,18 @@
 +#include <linux/squashfs_fs_sb.h>
 +#include <linux/squashfs_fs_i.h>
 +#include <linux/buffer_head.h>
-+#include <linux/exportfs.h>
-+#include <linux/sched.h>
 +#include <linux/vfs.h>
 +#include <linux/vmalloc.h>
++#include <linux/spinlock.h>
 +#include <linux/smp_lock.h>
 +#include <linux/exportfs.h>
 +
 +#include "squashfs.h"
 +
-+static int squashfs_cached_blks;
-+
++static struct dentry *squashfs_fh_to_dentry(struct super_block *s,
++              struct fid *fid, int fh_len, int fh_type);
++static struct dentry *squashfs_fh_to_parent(struct super_block *s,
++              struct fid *fid, int fh_len, int fh_type);
 +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 *);
@@ -154,14 +155,9 @@
 +      .remount_fs = squashfs_remount
 +};
 +
-+static struct super_operations squashfs_export_super_ops = {
-+      .alloc_inode = squashfs_alloc_inode,
-+      .destroy_inode = squashfs_destroy_inode,
-+      .statfs = squashfs_statfs,
-+      .put_super = squashfs_put_super,
-+};
-+
 +static struct export_operations squashfs_export_ops = {
++      .fh_to_dentry = squashfs_fh_to_dentry,
++      .fh_to_parent = squashfs_fh_to_parent,
 +      .get_parent = squashfs_get_parent
 +};
 +
@@ -269,7 +265,7 @@
 +              goto read_failure;
 +
 +      if (c_byte) {
-+              bytes = msblk->devblksize - offset;
++              bytes = -offset;
 +              compressed = SQUASHFS_COMPRESSED_BLOCK(c_byte);
 +              c_byte = SQUASHFS_COMPRESSED_SIZE_BLOCK(c_byte);
 +
@@ -279,12 +275,8 @@
 +              if (c_byte > srclength || index < 0 || (index + c_byte) > 
sblk->bytes_used)
 +                      goto read_failure;
 +
-+              bh[0] = sb_getblk(s, cur_index);
-+              if (bh[0] == NULL)
-+                      goto block_release;
-+
-+              for (b = 1; bytes < c_byte; b++) {
-+                      bh[b] = sb_getblk(s, ++cur_index);
++              for (b = 0; bytes < (int) c_byte; b++, cur_index++) {
++                      bh[b] = sb_getblk(s, cur_index);
 +                      if (bh[b] == NULL)
 +                              goto block_release;
 +                      bytes += msblk->devblksize;
@@ -297,6 +289,7 @@
 +              bh[0] = get_block_length(s, &cur_index, &offset, &c_byte);
 +              if (bh[0] == NULL)
 +                      goto read_failure;
++              b = 1;
 +
 +              bytes = msblk->devblksize - offset;
 +              compressed = SQUASHFS_COMPRESSED(c_byte);
@@ -306,9 +299,9 @@
 +                                      ? "" : "un", (unsigned int) c_byte);
 +
 +              if (c_byte > srclength || (index + c_byte) > sblk->bytes_used)
-+                      goto read_failure;
++                      goto block_release;
 +
-+              for (b = 1; bytes < c_byte; b++) {
++              for (; bytes < c_byte; b++) {
 +                      bh[b] = sb_getblk(s, ++cur_index);
 +                      if (bh[b] == NULL)
 +                              goto block_release;
@@ -418,117 +411,204 @@
 +}
 +
 +
-+SQSH_EXTERN int squashfs_get_cached_block(struct super_block *s, void *buffer,
-+                              long long block, unsigned int offset,
-+                              int length, long long *next_block,
-+                              unsigned int *next_offset)
++static struct squashfs_cache_entry *squashfs_cache_get(struct super_block *s,
++      struct squashfs_cache *cache, long long block, int length)
 +{
-+      struct squashfs_sb_info *msblk = s->s_fs_info;
-+      int n, i, bytes, return_length = length;
-+      long long next_index;
++      int i, n;
++      struct squashfs_cache_entry *entry;
 +
-+      TRACE("Entered squashfs_get_cached_block [%llx:%x]\n", block, offset);
++      spin_lock(&cache->lock);
 +
 +      while (1) {
-+              for (i = 0; i < squashfs_cached_blks; i++) 
-+                      if (msblk->block_cache[i].block == block)
-+                              break; 
-+              
-+              mutex_lock(&msblk->block_cache_mutex);
++              for (i = 0; i < cache->entries && cache->entry[i].block != 
block; i++);
 +
-+              if (i == squashfs_cached_blks) {
-+                      /* read inode header block */
-+                      if (msblk->unused_cache_blks == 0) {
-+                              mutex_unlock(&msblk->block_cache_mutex);
-+                              wait_event(msblk->waitq, 
msblk->unused_cache_blks);
++              if (i == cache->entries) {
++                      if (cache->unused_blks == 0) {
++                              cache->waiting ++;
++                              spin_unlock(&cache->lock);
++                              wait_event(cache->wait_queue, 
cache->unused_blks);
++                              spin_lock(&cache->lock);
++                              cache->waiting --;
 +                              continue;
 +                      }
 +
-+                      i = msblk->next_cache;
-+                      for (n = 0; n < squashfs_cached_blks; n++) {
-+                              if (msblk->block_cache[i].block != 
SQUASHFS_USED_BLK)
++                      i = cache->next_blk;
++                      for (n = 0; n < cache->entries; n++) {
++                              if (cache->entry[i].locked == 0)
 +                                      break;
-+                              i = (i + 1) % squashfs_cached_blks;
++                              i = (i + 1) % cache->entries;
 +                      }
 +
-+                      msblk->next_cache = (i + 1) % squashfs_cached_blks;
++                      cache->next_blk = (i + 1) % cache->entries;
++                      entry = &cache->entry[i];
 +
-+                      if (msblk->block_cache[i].block == 
SQUASHFS_INVALID_BLK) {
-+                              msblk->block_cache[i].data = 
vmalloc(SQUASHFS_METADATA_SIZE);
-+                              if (msblk->block_cache[i].data == NULL) {
-+                                      ERROR("Failed to allocate cache 
block\n");
-+                                      mutex_unlock(&msblk->block_cache_mutex);
-+                                      goto out;
-+                              }
-+                      }
-+      
-+                      msblk->block_cache[i].block = SQUASHFS_USED_BLK;
-+                      msblk->unused_cache_blks --;
-+                      mutex_unlock(&msblk->block_cache_mutex);
-+
-+                      msblk->block_cache[i].length = squashfs_read_data(s,
-+                              msblk->block_cache[i].data, block, 0, 
&next_index,
-+                              SQUASHFS_METADATA_SIZE);
-+
-+                      if (msblk->block_cache[i].length == 0) {
-+                              ERROR("Unable to read cache block [%llx:%x]\n", 
block, offset);
-+                              mutex_lock(&msblk->block_cache_mutex);
-+                              msblk->block_cache[i].block = 
SQUASHFS_INVALID_BLK;
-+                              msblk->unused_cache_blks ++;
-+                              smp_mb();
-+                              vfree(msblk->block_cache[i].data);
-+                              wake_up(&msblk->waitq);
-+                              mutex_unlock(&msblk->block_cache_mutex);
-+                              goto out;
-+                      }
++                      cache->unused_blks --;
++                      entry->block = block;
++                      entry->locked = 1;
++                      entry->pending = 1;
++                      entry->waiting = 0;
++                      entry->error = 0;
++                      spin_unlock(&cache->lock);
++
++                      entry->length = squashfs_read_data(s, entry->data,
++                              block, length, &entry->next_index, 
cache->block_size);
++
++                      spin_lock(&cache->lock);
++
++                      if (entry->length == 0)
++                              entry->error = 1;
++
++                      entry->pending = 0;
++                      spin_unlock(&cache->lock);
++                      if (entry->waiting)
++                              wake_up_all(&entry->wait_queue);
++                      goto out;
++              }
 +
-+                      mutex_lock(&msblk->block_cache_mutex);
-+                      msblk->block_cache[i].block = block;
-+                      msblk->block_cache[i].next_index = next_index;
-+                      msblk->unused_cache_blks ++;
-+                      smp_mb();
-+                      wake_up(&msblk->waitq);
-+                      TRACE("Read cache block [%llx:%x]\n", block, offset);
++              entry = &cache->entry[i];
++              if (entry->locked == 0)
++                      cache->unused_blks --;
++              entry->locked++;
++
++              if (entry->pending) {
++                      entry->waiting ++;
++                      spin_unlock(&cache->lock);
++                      wait_event(entry->wait_queue, !entry->pending);
++                      goto out;
 +              }
 +
-+              if (msblk->block_cache[i].block != block) {
-+                      mutex_unlock(&msblk->block_cache_mutex);
-+                      continue;
++              spin_unlock(&cache->lock);
++              goto out;
++      }
++
++out:
++      TRACE("Got %s %d, start block %lld, locked %d, error %d\n", i,
++              cache->name, entry->block, entry->locked, entry->error);
++      if (entry->error)
++              ERROR("Unable to read %s cache entry [%llx]\n", cache->name, 
block);
++      return entry;
++}
++
++
++static void squashfs_cache_put(struct squashfs_cache *cache,
++                              struct squashfs_cache_entry *entry)
++{
++      spin_lock(&cache->lock);
++      entry->locked --;
++      if (entry->locked == 0) {
++              cache->unused_blks ++;
++              spin_unlock(&cache->lock);
++              if (cache->waiting)
++                      wake_up(&cache->wait_queue);
++      } else
++              spin_unlock(&cache->lock);
++}
++
++
++static void squashfs_cache_delete(struct squashfs_cache *cache)
++{
++      int i;
++
++      if (cache == NULL)
++              return;
++
++      for (i = 0; i < cache->entries; i++)
++              if (cache->entry[i].data) {
++                      if (cache->use_vmalloc)
++                              vfree(cache->entry[i].data);
++                      else
++                              kfree(cache->entry[i].data);
 +              }
 +
-+              bytes = msblk->block_cache[i].length - offset;
++      kfree(cache);
++}
++
 +
-+              if (bytes < 1) {
-+                      mutex_unlock(&msblk->block_cache_mutex);
-+                      goto out;
++static struct squashfs_cache *squashfs_cache_init(char *name, int entries,
++      int block_size, int use_vmalloc)
++{
++      int i;
++      struct squashfs_cache *cache = kzalloc(sizeof(struct squashfs_cache) +
++                      entries * sizeof(struct squashfs_cache_entry), 
GFP_KERNEL);
++      if (cache == NULL) {
++              ERROR("Failed to allocate %s cache\n", name);
++              goto failed;
++      }
++
++      cache->next_blk = 0;
++      cache->unused_blks = entries;
++      cache->entries = entries;
++      cache->block_size = block_size;
++      cache->use_vmalloc = use_vmalloc;
++      cache->name = name;
++      cache->waiting = 0;
++      spin_lock_init(&cache->lock);
++      init_waitqueue_head(&cache->wait_queue);
++
++      for (i = 0; i < entries; i++) {
++              init_waitqueue_head(&cache->entry[i].wait_queue);
++              cache->entry[i].block = SQUASHFS_INVALID_BLK;
++              cache->entry[i].data = use_vmalloc ? vmalloc(block_size) :
++                              kmalloc(block_size, GFP_KERNEL);
++              if (cache->entry[i].data == NULL) {
++                      ERROR("Failed to allocate %s cache entry\n", name);
++                      goto cleanup;
++              }
++      }
++
++      return cache;
++
++cleanup:
++      squashfs_cache_delete(cache);
++failed:
++      return NULL;
++}
++
++
++SQSH_EXTERN int squashfs_get_cached_block(struct super_block *s, void *buffer,
++                              long long block, unsigned int offset,
++                              int length, long long *next_block,
++                              unsigned int *next_offset)
++{
++      struct squashfs_sb_info *msblk = s->s_fs_info;
++      int bytes, return_length = length;
++      struct squashfs_cache_entry *entry;
++
++      TRACE("Entered squashfs_get_cached_block [%llx:%x]\n", block, offset);
++
++      while (1) {
++              entry = squashfs_cache_get(s, msblk->block_cache, block, 0);
++              bytes = entry->length - offset;
++
++              if (entry->error || bytes < 1) {
++                      return_length = 0;
++                      goto finish;
 +              } else if (bytes >= length) {
 +                      if (buffer)
-+                              memcpy(buffer, msblk->block_cache[i].data + 
offset, length);
-+                      if (msblk->block_cache[i].length - offset == length) {
-+                              *next_block = msblk->block_cache[i].next_index;
++                              memcpy(buffer, entry->data + offset, length);
++                      if (entry->length - offset == length) {
++                              *next_block = entry->next_index;
 +                              *next_offset = 0;
 +                      } else {
 +                              *next_block = block;
 +                              *next_offset = offset + length;
 +                      }
-+                      mutex_unlock(&msblk->block_cache_mutex);
 +                      goto finish;
 +              } else {
 +                      if (buffer) {
-+                              memcpy(buffer, msblk->block_cache[i].data + 
offset, bytes);
++                              memcpy(buffer, entry->data + offset, bytes);
 +                              buffer = (char *) buffer + bytes;
 +                      }
-+                      block = msblk->block_cache[i].next_index;
-+                      mutex_unlock(&msblk->block_cache_mutex);
++                      block = entry->next_index;
++                      squashfs_cache_put(msblk->block_cache, entry);
 +                      length -= bytes;
 +                      offset = 0;
 +              }
 +      }
 +
 +finish:
++      squashfs_cache_put(msblk->block_cache, entry);
 +      return return_length;
-+out:
-+      return 0;
 +}
 +
 +
@@ -565,98 +645,19 @@
 +
 +
 +SQSH_EXTERN void release_cached_fragment(struct squashfs_sb_info *msblk,
-+                              struct squashfs_fragment_cache *fragment)
++                              struct squashfs_cache_entry *fragment)
 +{
-+      mutex_lock(&msblk->fragment_mutex);
-+      fragment->locked --;
-+      if (fragment->locked == 0) {
-+              msblk->unused_frag_blks ++;
-+              smp_mb();
-+              wake_up(&msblk->fragment_wait_queue);
-+      }
-+      mutex_unlock(&msblk->fragment_mutex);
++      squashfs_cache_put(msblk->fragment_cache, fragment);
 +}
 +
 +
 +SQSH_EXTERN
-+struct squashfs_fragment_cache *get_cached_fragment(struct super_block *s,
++struct squashfs_cache_entry *get_cached_fragment(struct super_block *s,
 +                              long long start_block, int length)
 +{
-+      int i, n;
 +      struct squashfs_sb_info *msblk = s->s_fs_info;
-+      struct squashfs_super_block *sblk = &msblk->sblk;
-+
-+      while (1) {
-+              mutex_lock(&msblk->fragment_mutex);
-+
-+              for (i = 0; i < SQUASHFS_CACHED_FRAGMENTS &&
-+                              msblk->fragment[i].block != start_block; i++);
-+
-+              if (i == SQUASHFS_CACHED_FRAGMENTS) {
-+                      if (msblk->unused_frag_blks == 0) {
-+                              mutex_unlock(&msblk->fragment_mutex);
-+                              wait_event(msblk->fragment_wait_queue, 
msblk->unused_frag_blks);
-+                              continue;
-+                      }
-+
-+                      i = msblk->next_fragment;
-+                      for (n = 0; n < SQUASHFS_CACHED_FRAGMENTS; n++) {
-+                              if (msblk->fragment[i].locked == 0)
-+                                      break;
-+                              i = (i + 1) % SQUASHFS_CACHED_FRAGMENTS;
-+                      }
-+
-+                      msblk->next_fragment = (msblk->next_fragment + 1) %
-+                              SQUASHFS_CACHED_FRAGMENTS;
-+                      
-+                      if (msblk->fragment[i].data == NULL) {
-+                              msblk->fragment[i].data = 
vmalloc(sblk->block_size);
-+                              if (msblk->fragment[i].data == NULL) {
-+                                      ERROR("Failed to allocate fragment 
cache block\n");
-+                                      mutex_unlock(&msblk->fragment_mutex);
-+                                      goto out;
-+                              }
-+                      }
-+
-+                      msblk->unused_frag_blks --;
-+                      msblk->fragment[i].block = SQUASHFS_INVALID_BLK;
-+                      msblk->fragment[i].locked = 1;
-+                      mutex_unlock(&msblk->fragment_mutex);
-+
-+                      msblk->fragment[i].length = squashfs_read_data(s,
-+                              msblk->fragment[i].data, start_block, length, 
NULL,
-+                              sblk->block_size);
-+
-+                      if (msblk->fragment[i].length == 0) {
-+                              ERROR("Unable to read fragment cache block 
[%llx]\n", start_block);
-+                              msblk->fragment[i].locked = 0;
-+                              msblk->unused_frag_blks ++;
-+                              smp_mb();
-+                              wake_up(&msblk->fragment_wait_queue);
-+                              goto out;
-+                      }
-+
-+                      mutex_lock(&msblk->fragment_mutex);
-+                      msblk->fragment[i].block = start_block;
-+                      TRACE("New fragment %d, start block %lld, locked %d\n",
-+                              i, msblk->fragment[i].block, 
msblk->fragment[i].locked);
-+                      mutex_unlock(&msblk->fragment_mutex);
-+                      break;
-+              }
 +
-+              if (msblk->fragment[i].locked == 0)
-+                      msblk->unused_frag_blks --;
-+              msblk->fragment[i].locked++;
-+              mutex_unlock(&msblk->fragment_mutex);
-+              TRACE("Got fragment %d, start block %lld, locked %d\n", i,
-+                      msblk->fragment[i].block, msblk->fragment[i].locked);
-+              break;
-+      }
-+
-+      return &msblk->fragment[i];
-+
-+out:
-+      return NULL;
++      return squashfs_cache_get(s, msblk->fragment_cache, start_block, 
length);
 +}
 +
 +
@@ -676,34 +677,85 @@
 +      else
 +              i->i_gid = msblk->guid[inodeb->guid];
 +}
-+      
 +
-+static struct dentry *squashfs_get_parent(struct dentry *child)
++
++static squashfs_inode_t squashfs_inode_lookup(struct super_block *s, int ino)
 +{
-+      struct inode *i = child->d_inode;
-+      struct inode *parent = iget_locked(i->i_sb, 
SQUASHFS_I(i)->u.s2.parent_inode);
-+      struct dentry *rv;
++      struct squashfs_sb_info *msblk = s->s_fs_info;
++      long long start = msblk->inode_lookup_table[SQUASHFS_LOOKUP_BLOCK(ino - 
1)];
++      int offset = SQUASHFS_LOOKUP_BLOCK_OFFSET(ino - 1);
++      squashfs_inode_t inode;
 +
-+      TRACE("Entered squashfs_get_parent\n");
++      TRACE("Entered squashfs_inode_lookup, inode_number = %d\n", ino);
 +
-+      if(parent == NULL) {
-+              rv = ERR_PTR(-EACCES);
-+              goto out;
-+      }
++      if (msblk->swap) {
++              squashfs_inode_t sinode;
 +
-+      rv = d_alloc_anon(parent);
-+      if(parent->i_state & I_NEW) {
-+              unlock_new_inode(parent);
-+      }
++              if (!squashfs_get_cached_block(s, &sinode, start, offset,
++                                      sizeof(sinode), &start, &offset))
++                      goto out;
++              SQUASHFS_SWAP_INODE_T((&inode), &sinode);
++      } else if (!squashfs_get_cached_block(s, &inode, start, offset,
++                                      sizeof(inode), &start, &offset))
++                      goto out;
++
++      TRACE("squashfs_inode_lookup, inode = 0x%llx\n", inode);
 +
-+      if(rv == NULL)
-+              rv = ERR_PTR(-ENOMEM);
++      return inode;
 +
 +out:
-+      return rv;
++      return SQUASHFS_INVALID_BLK;
 +}
 +
-+      
++
++
++static struct dentry *squashfs_export_iget(struct super_block *s,
++      unsigned int inode_number)
++{
++      squashfs_inode_t inode;
++      struct dentry *dentry = ERR_PTR(-ENOENT);
++
++      TRACE("Entered squashfs_export_iget\n");
++
++      inode = squashfs_inode_lookup(s, inode_number);
++      if(inode != SQUASHFS_INVALID_BLK)
++              dentry = d_obtain_alias(squashfs_iget(s, inode, inode_number));
++
++      return dentry;
++}
++
<<Diff was trimmed, longer than 597 lines>>

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

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to