Whamcloud - gitweb
Modified ChangeLog entry.
[fs/lustre-release.git] / lustre / kernel_patches / patches / linux-2.4.21-xattr-0.8.54-chaos.patch
index e18ac9d..686b1ea 100644 (file)
@@ -247,25 +247,6 @@ Index: linux-2.4.21-chaos/fs/ext2/inode.c
 ===================================================================
 --- linux-2.4.21-chaos.orig/fs/ext2/inode.c    2003-07-15 04:41:01.000000000 +0400
 +++ linux-2.4.21-chaos/fs/ext2/inode.c 2003-12-14 15:11:46.000000000 +0300
-@@ -39,6 +39,18 @@
- static int ext2_update_inode(struct inode * inode, int do_sync);
- /*
-+ * Test whether an inode is a fast symlink.
-+ */
-+static inline int ext2_inode_is_fast_symlink(struct inode *inode)
-+{
-+      int ea_blocks = inode->u.ext2_i.i_file_acl ?
-+              (inode->i_sb->s_blocksize >> 9) : 0;
-+
-+      return (S_ISLNK(inode->i_mode) &&
-+              inode->i_blocks - ea_blocks == 0);
-+}
-+
-+/*
-  * Called at each iput()
-  */
- void ext2_put_inode (struct inode * inode)
 @@ -53,9 +65,7 @@
  {
        lock_kernel();
@@ -308,12 +289,8 @@ Index: linux-2.4.21-chaos/fs/ext2/inode.c
                inode->i_op = &ext2_file_inode_operations;
                inode->i_fop = &ext2_file_operations;
                inode->i_mapping->a_ops = &ext2_aops;
-@@ -1002,15 +1010,17 @@
-               inode->i_fop = &ext2_dir_operations;
-               inode->i_mapping->a_ops = &ext2_aops;
-       } else if (S_ISLNK(inode->i_mode)) {
--              if (!inode->i_blocks)
-+              if (ext2_inode_is_fast_symlink(inode))
+@@ -1002,12 +1010,14 @@
+               if (ext2_inode_is_fast_symlink(inode))
                        inode->i_op = &ext2_fast_symlink_inode_operations;
                else {
 -                      inode->i_op = &page_symlink_inode_operations;
@@ -700,7 +677,7 @@ Index: linux-2.4.21-chaos/fs/ext2/xattr.c
 +void
 +ext2_xattr_unregister(int name_index, struct ext2_xattr_handler *handler)
 +{
-+      if (name_index > 0 || name_index <= EXT2_XATTR_INDEX_MAX) {
++      if (name_index > 0 && name_index <= EXT2_XATTR_INDEX_MAX) {
 +              write_lock(&ext2_handler_lock);
 +              ext2_xattr_handlers[name_index-1] = NULL;
 +              write_unlock(&ext2_handler_lock);
@@ -1315,7 +1292,7 @@ Index: linux-2.4.21-chaos/fs/ext2/xattr.c
 +              } else if (old_bh && header == HDR(old_bh)) {
 +                      /* Keep this block. */
 +                      new_bh = old_bh;
-+                      ext2_xattr_cache_insert(new_bh);
++                      (void)ext2_xattr_cache_insert(new_bh);
 +              } else {
 +                      /* We need to allocate a new block */
 +                      int force = EXT2_I(inode)->i_file_acl != 0;
@@ -1334,7 +1311,7 @@ Index: linux-2.4.21-chaos/fs/ext2/xattr.c
 +                      memcpy(new_bh->b_data, header, new_bh->b_size);
 +                      mark_buffer_uptodate(new_bh, 1);
 +                      unlock_buffer(new_bh);
-+                      ext2_xattr_cache_insert(new_bh);
++                      (void)ext2_xattr_cache_insert(new_bh);
 +                      
 +                      ext2_xattr_update_super_block(sb);
 +              }