sh: convert /proc/cpu/aligmnent, /proc/cpu/kernel_alignment to seq_file
[safe/jmp/linux-2.6] / fs / udf / symlink.c
index c4b82a9..c3265e1 100644 (file)
@@ -11,7 +11,7 @@
  *     Each contributing author retains all rights to their own work.
  *
  *  (C) 1998-2001 Ben Fennema
- *  (C) 1999 Stelias Computing Inc 
+ *  (C) 1999 Stelias Computing Inc
  *
  * HISTORY
  *
@@ -23,7 +23,6 @@
 #include <asm/uaccess.h>
 #include <linux/errno.h>
 #include <linux/fs.h>
-#include <linux/udf_fs.h>
 #include <linux/time.h>
 #include <linux/mm.h>
 #include <linux/stat.h>
@@ -79,11 +78,13 @@ static int udf_symlink_filler(struct file *file, struct page *page)
        char *symlink;
        int err = -EIO;
        char *p = kmap(page);
+       struct udf_inode_info *iinfo;
 
        lock_kernel();
-       if (UDF_I_ALLOCTYPE(inode) == ICBTAG_FLAG_AD_IN_ICB)
-               symlink = UDF_I_DATA(inode) + UDF_I_LENEATTR(inode);
-       else {
+       iinfo = UDF_I(inode);
+       if (iinfo->i_alloc_type == ICBTAG_FLAG_AD_IN_ICB) {
+               symlink = iinfo->i_ext.i_data + iinfo->i_lenEAttr;
+       } else {
                bh = sb_bread(inode->i_sb, udf_block_map(inode, 0));
 
                if (!bh)
@@ -100,7 +101,8 @@ static int udf_symlink_filler(struct file *file, struct page *page)
        kunmap(page);
        unlock_page(page);
        return 0;
-      out:
+
+out:
        unlock_kernel();
        SetPageError(page);
        kunmap(page);
@@ -112,5 +114,5 @@ static int udf_symlink_filler(struct file *file, struct page *page)
  * symlinks can't do much...
  */
 const struct address_space_operations udf_symlink_aops = {
-       .readpage = udf_symlink_filler,
+       .readpage               = udf_symlink_filler,
 };