Whamcloud - gitweb
Branch HEAD
[fs/lustre-release.git] / lustre / kernel_patches / patches / linux-2.4.20-xattr-0.8.54-hp.patch
index c9fb126..3c156e8 100644 (file)
 +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);
 +              } 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;
 +                      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);
 +              }
 +              } else if (old_bh && header == HDR(old_bh)) {
 +                      /* Keep this block. */
 +                      new_bh = old_bh;
-+                      ext3_xattr_cache_insert(new_bh);
++                      (void)ext3_xattr_cache_insert(new_bh);
 +              } else {
 +                      /* We need to allocate a new block */
 +                      int force = EXT3_I(inode)->i_file_acl != 0;
 +                      memcpy(new_bh->b_data, header, new_bh->b_size);
 +                      mark_buffer_uptodate(new_bh, 1);
 +                      unlock_buffer(new_bh);
-+                      ext3_xattr_cache_insert(new_bh);
++                      (void)ext3_xattr_cache_insert(new_bh);
 +                      
 +                      ext3_xattr_update_super_block(handle, sb);
 +              }