summaryrefslogtreecommitdiffstats
path: root/fs/affs
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>1999-06-13 16:29:25 +0000
committerRalf Baechle <ralf@linux-mips.org>1999-06-13 16:29:25 +0000
commitdb7d4daea91e105e3859cf461d7e53b9b77454b2 (patch)
tree9bb65b95440af09e8aca63abe56970dd3360cc57 /fs/affs
parent9c1c01ead627bdda9211c9abd5b758d6c687d8ac (diff)
Merge with Linux 2.2.8.
Diffstat (limited to 'fs/affs')
-rw-r--r--fs/affs/Changes9
-rw-r--r--fs/affs/dir.c3
-rw-r--r--fs/affs/inode.c3
-rw-r--r--fs/affs/namei.c28
-rw-r--r--fs/affs/super.c1
5 files changed, 14 insertions, 30 deletions
diff --git a/fs/affs/Changes b/fs/affs/Changes
index 0432bdd0d..7a7faedd0 100644
--- a/fs/affs/Changes
+++ b/fs/affs/Changes
@@ -28,6 +28,15 @@ Known bugs:
Please direct bug reports to: hjw@zvw.de
+Version 3.10
+------------
+
+- Changed partition checker to allow devices
+ with physical blocks != 512 bytes.
+
+- The partition checker now also ignores the
+ word at 0xd0 that Windows likes to write to.
+
Version 3.9
-----------
diff --git a/fs/affs/dir.c b/fs/affs/dir.c
index 51e45b682..3a1c78ef0 100644
--- a/fs/affs/dir.c
+++ b/fs/affs/dir.c
@@ -90,9 +90,6 @@ affs_readdir(struct file *filp, void *dirent, filldir_t filldir)
pr_debug("AFFS: readdir(ino=%lu,f_pos=%lu)\n",inode->i_ino,(unsigned long)filp->f_pos);
- if (!inode || !S_ISDIR(inode->i_mode))
- return -EBADF;
-
stored = 0;
dir_bh = NULL;
fh_bh = NULL;
diff --git a/fs/affs/inode.c b/fs/affs/inode.c
index 80aad129c..9b05ec062 100644
--- a/fs/affs/inode.c
+++ b/fs/affs/inode.c
@@ -21,7 +21,6 @@
#include <linux/mm.h>
#include <linux/string.h>
#include <linux/locks.h>
-#include <linux/errno.h>
#include <linux/genhd.h>
#include <linux/amigaffs.h>
#include <linux/major.h>
@@ -293,7 +292,7 @@ affs_new_inode(const struct inode *dir)
sb = dir->i_sb;
inode->i_sb = sb;
- inode->i_flags = sb->s_flags;
+ inode->i_flags = 0;
if (!(block = affs_new_header((struct inode *)dir))) {
iput(inode);
diff --git a/fs/affs/namei.c b/fs/affs/namei.c
index a18c23a0f..48e951800 100644
--- a/fs/affs/namei.c
+++ b/fs/affs/namei.c
@@ -201,7 +201,7 @@ affs_find_entry(struct inode *dir, struct dentry *dentry, unsigned long *ino)
return bh;
}
-int
+struct dentry *
affs_lookup(struct inode *dir, struct dentry *dentry)
{
unsigned long ino;
@@ -218,11 +218,11 @@ affs_lookup(struct inode *dir, struct dentry *dentry)
affs_brelse(bh);
inode = iget(dir->i_sb,ino);
if (!inode)
- return -EACCES;
+ return ERR_PTR(-EACCES);
}
dentry->d_op = &affs_dentry_operations;
d_add(dentry,inode);
- return 0;
+ return NULL;
}
int
@@ -548,32 +548,14 @@ affs_rename(struct inode *old_dir, struct dentry *old_dentry,
"No inode for entry found (key=%lu)\n",new_ino);
goto end_rename;
}
- if (new_inode == old_inode) {
- if (old_ino == new_ino) { /* Filename might have changed case */
- retval = new_dentry->d_name.len < 31 ? new_dentry->d_name.len : 30;
- strncpy(DIR_END(old_bh->b_data,old_inode)->dir_name + 1,
- new_dentry->d_name.name,retval);
- DIR_END(old_bh->b_data,old_inode)->dir_name[0] = retval;
- goto new_checksum;
- }
- retval = 0;
- goto end_rename;
- }
if (S_ISDIR(old_inode->i_mode)) {
- retval = -EINVAL;
- if (is_subdir(new_dentry, old_dentry))
- goto end_rename;
if (new_inode) {
- if (new_dentry->d_count > 1)
- shrink_dcache_parent(new_dentry);
- retval = -EBUSY;
- if (new_dentry->d_count > 1)
- goto end_rename;
retval = -ENOTEMPTY;
if (!empty_dir(new_bh,AFFS_I2HSIZE(new_inode)))
goto end_rename;
}
+ retval = -ENOENT;
if (affs_parent_ino(old_inode) != old_dir->i_ino)
goto end_rename;
}
@@ -593,7 +575,6 @@ affs_rename(struct inode *old_dir, struct dentry *old_dentry,
affs_copy_name(FILE_END(old_bh->b_data,old_inode)->file_name,new_dentry->d_name.name);
if ((retval = affs_insert_hash(new_dir->i_ino,old_bh,new_dir)))
goto end_rename;
-new_checksum:
affs_fix_checksum(AFFS_I2BSIZE(new_dir),old_bh->b_data,5);
new_dir->i_ctime = new_dir->i_mtime = old_dir->i_ctime
@@ -604,7 +585,6 @@ new_checksum:
mark_inode_dirty(new_dir);
mark_inode_dirty(old_dir);
mark_buffer_dirty(old_bh,1);
- d_move(old_dentry,new_dentry);
end_rename:
affs_brelse(old_bh);
diff --git a/fs/affs/super.c b/fs/affs/super.c
index 464b6df8a..0c2a838f5 100644
--- a/fs/affs/super.c
+++ b/fs/affs/super.c
@@ -22,7 +22,6 @@
#include <linux/mm.h>
#include <linux/string.h>
#include <linux/locks.h>
-#include <linux/errno.h>
#include <linux/genhd.h>
#include <linux/amigaffs.h>
#include <linux/major.h>