Commit 295e4b4b authored by Linus Torvalds's avatar Linus Torvalds

Import 2.1.46pre1

parent 7b76b149
UPDATE NEWS: version 1.31 - 6 Jul 97
Fixed a bug that caused incorrect SCSI status bytes to be
returned from commands sent to LUN's greater than 0. This
means that CDROM changers work now! Fixed a bug in the
handling of command-line arguments when loaded as a module.
Also put all the header data in in2000.h where it belongs.
There are no longer any differences between this driver in
the 2.1.xx source tree and the 2.0.xx tree, as of 2.0.31
and 2.1.45 (or is it .46?) - this makes things much easier
for me...
UPDATE NEWS: version 1.30 - 14 Oct 96 UPDATE NEWS: version 1.30 - 14 Oct 96
Fixed a bug in the code that sets the transfer direction Fixed a bug in the code that sets the transfer direction
...@@ -105,15 +117,10 @@ to see what happens: my tests showed little difference either way. ...@@ -105,15 +117,10 @@ to see what happens: my tests showed little difference either way.
There's also a define called 'DEFAULT_SX_PER'; this sets the data There's also a define called 'DEFAULT_SX_PER'; this sets the data
transfer speed for the asynchronous mode. I've put it at 500 ns transfer speed for the asynchronous mode. I've put it at 500 ns
despite the fact that the card could handle settings of 376 or despite the fact that the card could handle settings of 376 or
252, because I'm not really sure if certain devices or maybe bad 252, because higher speeds may be a problem with poor quality
cables might have trouble at higher speeds. I couldn't find any cables or improper termination; 500 ns is a compromise. You can
info in my various SCSI references that talk about this in language choose your own default through the command-line with the
I could understand, so decided to compromise with 500. This is still 'period' keyword.
faster than the old driver was set at (I think). Can someone explain
the significance of the bus transfer speed setting? Do devices on
the bus ever care what it is? Is cable quality a factor here?
Regardless, you can choose your own default through the command-
line with the 'period' keyword.
------------------------------------------------ ------------------------------------------------
......
This diff is collapsed.
This diff is collapsed.
...@@ -156,6 +156,8 @@ static int load_inode_bitmap (struct super_block * sb, ...@@ -156,6 +156,8 @@ static int load_inode_bitmap (struct super_block * sb,
void ext2_free_inode (struct inode * inode) void ext2_free_inode (struct inode * inode)
{ {
int is_directory;
unsigned long ino;
struct super_block * sb; struct super_block * sb;
struct buffer_head * bh; struct buffer_head * bh;
struct buffer_head * bh2; struct buffer_head * bh2;
...@@ -185,30 +187,38 @@ void ext2_free_inode (struct inode * inode) ...@@ -185,30 +187,38 @@ void ext2_free_inode (struct inode * inode)
return; return;
} }
ext2_debug ("freeing inode %lu\n", inode->i_ino); ino = inode->i_ino;
ext2_debug ("freeing inode %lu\n", ino);
sb = inode->i_sb; sb = inode->i_sb;
lock_super (sb); lock_super (sb);
if (inode->i_ino < EXT2_FIRST_INO(sb) || if (ino < EXT2_FIRST_INO(sb) ||
inode->i_ino > le32_to_cpu(sb->u.ext2_sb.s_es->s_inodes_count)) { ino > le32_to_cpu(sb->u.ext2_sb.s_es->s_inodes_count)) {
ext2_error (sb, "free_inode", ext2_error (sb, "free_inode",
"reserved inode or nonexistent inode"); "reserved inode or nonexistent inode");
unlock_super (sb); unlock_super (sb);
return; return;
} }
es = sb->u.ext2_sb.s_es; es = sb->u.ext2_sb.s_es;
block_group = (inode->i_ino - 1) / EXT2_INODES_PER_GROUP(sb); block_group = (ino - 1) / EXT2_INODES_PER_GROUP(sb);
bit = (inode->i_ino - 1) % EXT2_INODES_PER_GROUP(sb); bit = (ino - 1) % EXT2_INODES_PER_GROUP(sb);
bitmap_nr = load_inode_bitmap (sb, block_group); bitmap_nr = load_inode_bitmap (sb, block_group);
bh = sb->u.ext2_sb.s_inode_bitmap[bitmap_nr]; bh = sb->u.ext2_sb.s_inode_bitmap[bitmap_nr];
is_directory = S_ISDIR(inode->i_mode);
if (sb->dq_op)
sb->dq_op->free_inode (inode, 1);
clear_inode (inode);
if (!ext2_clear_bit (bit, bh->b_data)) if (!ext2_clear_bit (bit, bh->b_data))
ext2_warning (sb, "ext2_free_inode", ext2_warning (sb, "ext2_free_inode",
"bit already cleared for inode %lu", inode->i_ino); "bit already cleared for inode %lu", ino);
else { else {
gdp = get_group_desc (sb, block_group, &bh2); gdp = get_group_desc (sb, block_group, &bh2);
gdp->bg_free_inodes_count = gdp->bg_free_inodes_count =
cpu_to_le16(le16_to_cpu(gdp->bg_free_inodes_count) + 1); cpu_to_le16(le16_to_cpu(gdp->bg_free_inodes_count) + 1);
if (S_ISDIR(inode->i_mode)) if (is_directory)
gdp->bg_used_dirs_count = gdp->bg_used_dirs_count =
cpu_to_le16(le16_to_cpu(gdp->bg_used_dirs_count) - 1); cpu_to_le16(le16_to_cpu(gdp->bg_used_dirs_count) - 1);
mark_buffer_dirty(bh2, 1); mark_buffer_dirty(bh2, 1);
...@@ -221,10 +231,7 @@ void ext2_free_inode (struct inode * inode) ...@@ -221,10 +231,7 @@ void ext2_free_inode (struct inode * inode)
ll_rw_block (WRITE, 1, &bh); ll_rw_block (WRITE, 1, &bh);
wait_on_buffer (bh); wait_on_buffer (bh);
} }
if (sb->dq_op)
sb->dq_op->free_inode (inode, 1);
sb->s_dirt = 1; sb->s_dirt = 1;
clear_inode (inode);
unlock_super (sb); unlock_super (sb);
} }
......
...@@ -438,6 +438,8 @@ void iput(struct inode *inode) ...@@ -438,6 +438,8 @@ void iput(struct inode *inode)
if (!inode->i_nlink) { if (!inode->i_nlink) {
list_del(&inode->i_hash); list_del(&inode->i_hash);
INIT_LIST_HEAD(&inode->i_hash); INIT_LIST_HEAD(&inode->i_hash);
list_del(&inode->i_list);
INIT_LIST_HEAD(&inode->i_list);
if (op && op->delete_inode) { if (op && op->delete_inode) {
void (*delete)(struct inode *) = op->delete_inode; void (*delete)(struct inode *) = op->delete_inode;
spin_unlock(&inode_lock); spin_unlock(&inode_lock);
......
...@@ -255,7 +255,6 @@ static struct dentry * real_lookup(struct dentry * parent, struct qstr * name) ...@@ -255,7 +255,6 @@ static struct dentry * real_lookup(struct dentry * parent, struct qstr * name)
} }
up(&dir->i_sem); up(&dir->i_sem);
} }
up(&dir->i_sem);
return result; return result;
} }
...@@ -389,6 +388,9 @@ struct dentry * lookup_dentry(const char * name, struct dentry * base, int follo ...@@ -389,6 +388,9 @@ struct dentry * lookup_dentry(const char * name, struct dentry * base, int follo
struct qstr this; struct qstr this;
char c, follow; char c, follow;
dentry = base;
if (IS_ERR(base))
break;
dentry = ERR_PTR(-ENOENT); dentry = ERR_PTR(-ENOENT);
if (!base->d_inode) if (!base->d_inode)
break; break;
......
...@@ -391,7 +391,6 @@ static struct inode * get_pipe_inode(void) ...@@ -391,7 +391,6 @@ static struct inode * get_pipe_inode(void)
} else { } else {
PIPE_BASE(*inode) = (char *) page; PIPE_BASE(*inode) = (char *) page;
inode->i_op = &pipe_inode_operations; inode->i_op = &pipe_inode_operations;
inode->i_count = 1;
PIPE_WAIT(*inode) = NULL; PIPE_WAIT(*inode) = NULL;
PIPE_START(*inode) = PIPE_LEN(*inode) = 0; PIPE_START(*inode) = PIPE_LEN(*inode) = 0;
PIPE_RD_OPENERS(*inode) = PIPE_WR_OPENERS(*inode) = 0; PIPE_RD_OPENERS(*inode) = PIPE_WR_OPENERS(*inode) = 0;
...@@ -404,7 +403,7 @@ static struct inode * get_pipe_inode(void) ...@@ -404,7 +403,7 @@ static struct inode * get_pipe_inode(void)
* that it already _is_ on the dirty list. * that it already _is_ on the dirty list.
*/ */
inode->i_state = 1 << I_DIRTY; inode->i_state = 1 << I_DIRTY;
inode->i_mode |= S_IFIFO | S_IRUSR | S_IWUSR; inode->i_mode = S_IFIFO | S_IRUSR | S_IWUSR;
inode->i_uid = current->fsuid; inode->i_uid = current->fsuid;
inode->i_gid = current->fsgid; inode->i_gid = current->fsgid;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME; inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
......
...@@ -227,7 +227,6 @@ static int get_fd(struct inode *inode) ...@@ -227,7 +227,6 @@ static int get_fd(struct inode *inode)
file->f_op = &socket_file_ops; file->f_op = &socket_file_ops;
file->f_mode = 3; file->f_mode = 3;
file->f_flags = O_RDWR; file->f_flags = O_RDWR;
file->f_dentry = d_alloc_root(inode, NULL);
file->f_pos = 0; file->f_pos = 0;
} }
return fd; return fd;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment