]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - fs/udf/directory.c
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6
[linux-2.6-omap-h63xx.git] / fs / udf / directory.c
index d8ceb44f4f220c1d11cfcd575fae59faeb168b0f..2820f8fcf4cc2e932b72f70cf25a7c69586546d9 100644 (file)
@@ -95,7 +95,7 @@ struct fileIdentDesc *udf_fileident_read(struct inode *dir, loff_t *nf_pos,
                if (!fi)
                        return NULL;
 
-               *nf_pos += ((fibh->eoffset - fibh->soffset) >> 2);
+               *nf_pos += fibh->eoffset - fibh->soffset;
 
                memcpy((uint8_t *)cfi, (uint8_t *)fi,
                       sizeof(struct fileIdentDesc));
@@ -157,7 +157,7 @@ struct fileIdentDesc *udf_fileident_read(struct inode *dir, loff_t *nf_pos,
        if (!fi)
                return NULL;
 
-       *nf_pos += ((fibh->eoffset - fibh->soffset) >> 2);
+       *nf_pos += fibh->eoffset - fibh->soffset;
 
        if (fibh->eoffset <= dir->i_sb->s_blocksize) {
                memcpy((uint8_t *)cfi, (uint8_t *)fi,
@@ -197,8 +197,7 @@ struct fileIdentDesc *udf_fileident_read(struct inode *dir, loff_t *nf_pos,
                                  cfi->lengthFileIdent +
                                  le16_to_cpu(cfi->lengthOfImpUse) + 3) & ~3;
 
-                       *nf_pos += (fi_len - (fibh->eoffset - fibh->soffset))
-                                       >> 2;
+                       *nf_pos += fi_len - (fibh->eoffset - fibh->soffset);
                        fibh->eoffset = fibh->soffset + fi_len;
                } else {
                        memcpy((uint8_t *)cfi, (uint8_t *)fi,
@@ -282,7 +281,7 @@ static extent_ad *udf_get_fileextent(void *buffer, int bufsize, int *offset)
 }
 #endif
 
-short_ad *udf_get_fileshortad(uint8_t *ptr, int maxoffset, int *offset,
+short_ad *udf_get_fileshortad(uint8_t *ptr, int maxoffset, uint32_t *offset,
                              int inc)
 {
        short_ad *sa;
@@ -292,7 +291,7 @@ short_ad *udf_get_fileshortad(uint8_t *ptr, int maxoffset, int *offset,
                return NULL;
        }
 
-       if ((*offset < 0) || ((*offset + sizeof(short_ad)) > maxoffset))
+       if ((*offset + sizeof(short_ad)) > maxoffset)
                return NULL;
        else {
                sa = (short_ad *)ptr;
@@ -305,7 +304,7 @@ short_ad *udf_get_fileshortad(uint8_t *ptr, int maxoffset, int *offset,
        return sa;
 }
 
-long_ad *udf_get_filelongad(uint8_t *ptr, int maxoffset, int *offset, int inc)
+long_ad *udf_get_filelongad(uint8_t *ptr, int maxoffset, uint32_t *offset, int inc)
 {
        long_ad *la;
 
@@ -314,7 +313,7 @@ long_ad *udf_get_filelongad(uint8_t *ptr, int maxoffset, int *offset, int inc)
                return NULL;
        }
 
-       if ((*offset < 0) || ((*offset + sizeof(long_ad)) > maxoffset))
+       if ((*offset + sizeof(long_ad)) > maxoffset)
                return NULL;
        else {
                la = (long_ad *)ptr;