summaryrefslogtreecommitdiffstats
path: root/fs/udf
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2000-11-28 03:58:46 +0000
committerRalf Baechle <ralf@linux-mips.org>2000-11-28 03:58:46 +0000
commitb63ad0882a16a5d28003e57f2b0b81dee3fb322b (patch)
tree0a343ce219e2b8b38a5d702d66032c57b83d9720 /fs/udf
parenta9d7bff9a84dba79609a0002e5321b74c4d64c64 (diff)
Merge with 2.4.0-test11.
Diffstat (limited to 'fs/udf')
-rw-r--r--fs/udf/dir.c6
-rw-r--r--fs/udf/file.c4
-rw-r--r--fs/udf/ialloc.c10
-rw-r--r--fs/udf/inode.c7
-rw-r--r--fs/udf/symlink.c2
5 files changed, 8 insertions, 21 deletions
diff --git a/fs/udf/dir.c b/fs/udf/dir.c
index 9f093c536..9ec279e47 100644
--- a/fs/udf/dir.c
+++ b/fs/udf/dir.c
@@ -86,12 +86,6 @@ int udf_readdir(struct file *filp, void *dirent, filldir_t filldir)
struct inode *dir = filp->f_dentry->d_inode;
int result;
- if (!dir)
- return -EBADF;
-
- if (!S_ISDIR(dir->i_mode))
- return -ENOTDIR;
-
if ( filp->f_pos == 0 )
{
if (filldir(dirent, ".", 1, filp->f_pos, dir->i_ino, DT_DIR))
diff --git a/fs/udf/file.c b/fs/udf/file.c
index 9ba4a6641..7e8ac9b7d 100644
--- a/fs/udf/file.c
+++ b/fs/udf/file.c
@@ -54,7 +54,7 @@ static int udf_adinicb_readpage(struct file *file, struct page * page)
if (!PageLocked(page))
PAGE_BUG(page);
- kaddr = (char *)kmap(page);
+ kaddr = kmap(page);
memset(kaddr, 0, PAGE_CACHE_SIZE);
block = udf_get_lb_pblock(inode->i_sb, UDF_I_LOCATION(inode), 0);
bh = bread (inode->i_dev, block, inode->i_sb->s_blocksize);
@@ -78,7 +78,7 @@ static int udf_adinicb_writepage(struct file *file, struct page *page)
if (!PageLocked(page))
PAGE_BUG(page);
- kaddr = (char *)kmap(page);
+ kaddr = kmap(page);
block = udf_get_lb_pblock(inode->i_sb, UDF_I_LOCATION(inode), 0);
bh = bread (inode->i_dev, block, inode->i_sb->s_blocksize);
memcpy(bh->b_data + udf_ext0_offset(inode), kaddr, inode->i_size);
diff --git a/fs/udf/ialloc.c b/fs/udf/ialloc.c
index 5377773ce..5a2e7a1dc 100644
--- a/fs/udf/ialloc.c
+++ b/fs/udf/ialloc.c
@@ -77,15 +77,13 @@ struct inode * udf_new_inode (const struct inode *dir, int mode, int * err)
int block;
Uint32 start = UDF_I_LOCATION(dir).logicalBlockNum;
- inode = get_empty_inode();
+ sb = dir->i_sb;
+ inode = new_inode(sb);
if (!inode)
{
*err = -ENOMEM;
return NULL;
}
- sb = dir->i_sb;
- inode->i_sb = sb;
- inode->i_flags = 0;
*err = -ENOSPC;
block = udf_new_block(dir, UDF_I_LOCATION(dir).partitionReferenceNum,
@@ -115,9 +113,6 @@ struct inode * udf_new_inode (const struct inode *dir, int mode, int * err)
mark_buffer_dirty(UDF_SB_LVIDBH(sb));
}
inode->i_mode = mode;
- inode->i_sb = sb;
- inode->i_nlink = 1;
- inode->i_dev = sb->s_dev;
inode->i_uid = current->fsuid;
if (dir->i_mode & S_ISGID) {
inode->i_gid = dir->i_gid;
@@ -132,7 +127,6 @@ struct inode * udf_new_inode (const struct inode *dir, int mode, int * err)
inode->i_ino = udf_get_lb_pblock(sb, UDF_I_LOCATION(inode), 0);
inode->i_blksize = PAGE_SIZE;
inode->i_blocks = 0;
- inode->i_size = 0;
UDF_I_LENEATTR(inode) = 0;
UDF_I_LENALLOC(inode) = 0;
if (UDF_QUERY_FLAG(inode->i_sb, UDF_FLAG_USE_EXTENDED_FE))
diff --git a/fs/udf/inode.c b/fs/udf/inode.c
index 4219c505f..83a34f258 100644
--- a/fs/udf/inode.c
+++ b/fs/udf/inode.c
@@ -158,7 +158,6 @@ void udf_expand_file_adinicb(struct inode * inode, int newsize, int * err)
{
struct buffer_head *bh = NULL;
struct page *page;
- unsigned long kaddr = 0;
int block;
/* from now on we have normal address_space methods */
@@ -183,10 +182,10 @@ void udf_expand_file_adinicb(struct inode * inode, int newsize, int * err)
PAGE_BUG(page);
if (!Page_Uptodate(page))
{
- kaddr = kmap(page);
- memset((char *)kaddr + UDF_I_LENALLOC(inode), 0x00,
+ char *kaddr = kmap(page);
+ memset(kaddr + UDF_I_LENALLOC(inode), 0x00,
PAGE_CACHE_SIZE - UDF_I_LENALLOC(inode));
- memcpy((char *)kaddr, bh->b_data + udf_file_entry_alloc_offset(inode),
+ memcpy(kaddr, bh->b_data + udf_file_entry_alloc_offset(inode),
UDF_I_LENALLOC(inode));
flush_dcache_page(page);
SetPageUptodate(page);
diff --git a/fs/udf/symlink.c b/fs/udf/symlink.c
index 8a0dde5e4..547fc784b 100644
--- a/fs/udf/symlink.c
+++ b/fs/udf/symlink.c
@@ -83,7 +83,7 @@ static int udf_symlink_filler(struct file *file, struct page *page)
struct buffer_head *bh = NULL;
char *symlink;
int err = -EIO;
- char *p = (char *)kmap(page);
+ char *p = kmap(page);
lock_kernel();
if (UDF_I_ALLOCTYPE(inode) == ICB_FLAG_AD_IN_ICB)