diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1997-07-29 03:58:24 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1997-07-29 03:58:24 +0000 |
commit | 1c5c0c934f91fbce2825acbb849e98781e774c1d (patch) | |
tree | 12b5ae03516d4103bc070e4579ae1f7f71c27d24 /fs/minix | |
parent | 4fe70c31de87823ac9e804f4795589ba74dc6971 (diff) |
Merge with 2.1.47. Some more cleanup and module fixes.
Diffstat (limited to 'fs/minix')
-rw-r--r-- | fs/minix/bitmap.c | 3 | ||||
-rw-r--r-- | fs/minix/dir.c | 1 | ||||
-rw-r--r-- | fs/minix/file.c | 8 | ||||
-rw-r--r-- | fs/minix/namei.c | 3 |
4 files changed, 11 insertions, 4 deletions
diff --git a/fs/minix/bitmap.c b/fs/minix/bitmap.c index f47f779d5..9e27ee118 100644 --- a/fs/minix/bitmap.c +++ b/fs/minix/bitmap.c @@ -191,7 +191,7 @@ void minix_free_inode(struct inode * inode) printk("free_inode: inode has no device\n"); return; } - if (inode->i_count != 1) { + if (inode->i_count > 1) { printk("free_inode: inode has count=%d\n",inode->i_count); return; } @@ -251,7 +251,6 @@ struct inode * minix_new_inode(const struct inode * dir) iput(inode); return NULL; } - inode->i_count = 1; inode->i_nlink = 1; inode->i_dev = sb->s_dev; inode->i_uid = current->fsuid; diff --git a/fs/minix/dir.c b/fs/minix/dir.c index ec5113c4a..31ac394a2 100644 --- a/fs/minix/dir.c +++ b/fs/minix/dir.c @@ -92,5 +92,6 @@ static int minix_readdir(struct inode * inode, struct file * filp, } while (offset < 1024 && filp->f_pos < inode->i_size); brelse(bh); } + UPDATE_ATIME(inode); return 0; } diff --git a/fs/minix/file.c b/fs/minix/file.c index 7ca7cb075..ecd0d24d9 100644 --- a/fs/minix/file.c +++ b/fs/minix/file.c @@ -108,7 +108,13 @@ static long minix_file_write(struct inode * inode, struct file * filp, } } p = (pos % BLOCK_SIZE) + bh->b_data; - copy_from_user(p,buf,c); + c -= copy_from_user(p,buf,c); + if (!c) { + brelse(bh); + if (!written) + written = -EFAULT; + break; + } update_vm_cache(inode, pos, p, c); mark_buffer_uptodate(bh, 1); mark_buffer_dirty(bh, 0); diff --git a/fs/minix/namei.c b/fs/minix/namei.c index 718d3dd07..19c7df247 100644 --- a/fs/minix/namei.c +++ b/fs/minix/namei.c @@ -109,7 +109,7 @@ int minix_lookup(struct inode * dir, struct dentry *dentry) bh = minix_find_entry(dir, dentry->d_name.name, dentry->d_name.len, &de); if (bh) { - unsigned long ino = le32_to_cpu(de->inode); + int ino = de->inode; brelse (bh); inode = iget(dir->i_sb, ino); @@ -593,6 +593,7 @@ int minix_link(struct inode * inode, struct inode * dir, inode->i_nlink++; inode->i_ctime = CURRENT_TIME; mark_inode_dirty(inode); + inode->i_count++; d_instantiate(dentry, inode); return 0; } |