This commit was manufactured by cvs2svn to create tag
[linux-2.6.git] / include / linux / swapops.h
index d4c7db3..0cfc704 100644 (file)
@@ -30,7 +30,8 @@ static inline swp_entry_t swp_entry(unsigned long type, pgoff_t offset)
  */
 static inline unsigned swp_type(swp_entry_t entry)
 {
-       return (entry.val >> SWP_TYPE_SHIFT(entry));
+       return (entry.val >> SWP_TYPE_SHIFT(entry)) &
+                       ((1 << MAX_SWAPFILES_SHIFT) - 1);
 }
 
 /*