Messages in this thread Patch in this message | | | Date | Tue, 12 Aug 1997 18:51:33 +0300 (EET DST) | From | "Alexandr D. Kanevskiy" <> | Subject | 2.1.49 problem with affs/smbfs/ncpfs |
| |
Hi All !
I have some errors on affs/smbfs/ncpfs while compiling new kernels 44-49.
Possible solution:
------------------------------------------- diff -u -r linux-2.1.48.org/fs/affs/file.c linux-2.1.48/fs/affs/file.c --- linux-2.1.48.org/fs/affs/file.c Thu Aug 7 12:38:24 1997 +++ linux/fs/affs/file.c Sun Aug 10 13:01:54 1997 @@ -629,7 +629,7 @@ inode->i_size = pos; inode->i_mtime = inode->i_ctime = CURRENT_TIME; filp->f_pos = pos; - inode->i_dirt = 1; + mark_inode_dirty(inode); iput(ino); return written; } @@ -717,7 +717,7 @@ inode->i_size = pos; filp->f_pos = pos; inode->i_mtime = inode->i_ctime = CURRENT_TIME; - inode->i_dirt = 1; + mark_inode_dirty(inode); iput(ino); return written; } diff -u -r linux-2.1.48.org/fs/affs/inode.c linux-2.1.48/fs/affs/inode.c --- linux-2.1.48.org/fs/affs/inode.c Thu Aug 7 10:31:09 1997 +++ linux/fs/affs/inode.c Sun Aug 10 13:03:15 1997 @@ -595,11 +595,11 @@ s->s_dev = dev; s->s_op = &affs_sops; - s->s_mounted = iget(s,root_block); + s->s_root = d_alloc_root(iget(s,root_block),NULL); s->s_dirt = 1; unlock_super(s); - if (!(s->s_mounted)) { + if (!(s->s_root)) { s->s_dev = 0; printk(KERN_ERR "AFFS: get root inode failed\n"); MOD_DEC_USE_COUNT; @@ -609,9 +609,9 @@ /* create data zones if the fs is mounted r/w */ if (!(s->s_flags & MS_RDONLY)) { - ROOT_END(s->u.affs_sb.s_root_bh->b_data,s->s_mounted)->bm_flag = 0; + ROOT_END(s->u.affs_sb.s_root_bh->b_data,s->s_root->d_inode)->bm_flag = 0; secs_to_datestamp(CURRENT_TIME,&ROOT_END(s->u.affs_sb.s_root_bh->b_data, - s->s_mounted)->disk_altered); + s->s_root->d_inode)->disk_altered); affs_fix_checksum(s->s_blocksize,s->u.affs_sb.s_root_bh->b_data,5); mark_buffer_dirty(s->u.affs_sb.s_root_bh,1); affs_make_zones(s); @@ -803,7 +803,6 @@ pr_debug("AFFS: write_inode(%lu)\n",inode->i_ino); - inode->i_dirt = 0; if (!inode->i_nlink) return; if (!(bh = bread(inode->i_dev,inode->i_ino,AFFS_I2BSIZE(inode)))) { @@ -909,7 +908,7 @@ inode->i_dev = sb->s_dev; inode->i_uid = current->fsuid; inode->i_gid = current->fsgid; - inode->i_dirt = 1; + mark_inode_dirty(inode); inode->i_ino = block; inode->i_op = NULL; inode->i_blocks = 0; @@ -1012,7 +1011,7 @@ FILE_END(link_bh->b_data,link)->link_chain = ntohl(inode->i_ino); affs_fix_checksum(AFFS_I2BSIZE(link),link_bh->b_data,5); link->i_version = ++event; - link->i_dirt = 1; + mark_inode_dirty(link); mark_buffer_dirty(link_bh,1); } affs_fix_checksum(AFFS_I2BSIZE(inode),inode_bh->b_data,5); @@ -1021,8 +1020,8 @@ dir->i_mtime = dir->i_atime = dir->i_ctime = CURRENT_TIME; unlock_super(inode->i_sb); - dir->i_dirt = 1; - inode->i_dirt = 1; + mark_inode_dirty(dir); + mark_inode_dirty(inode); mark_buffer_dirty(dir_bh,1); mark_buffer_dirty(inode_bh,1); diff -u -r linux-2.1.48.org/fs/affs/namei.c linux-2.1.48/fs/affs/namei.c --- linux-2.1.48.org/fs/affs/namei.c Thu Aug 7 12:29:21 1997 +++ linux/fs/affs/namei.c Sun Aug 10 13:04:27 1997 @@ -205,10 +205,10 @@ goto unlink_done; inode->i_nlink=0; - inode->i_dirt=1; + mark_inode_dirty(inode); inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; dir->i_version = ++event; - dir->i_dirt=1; + mark_inode_dirty(dir); unlink_done: affs_brelse(bh); iput(inode); @@ -244,7 +244,7 @@ if (error) { iput(dir); inode->i_nlink = 0; - inode->i_dirt = 1; + mark_inode_dirty(inode); iput(inode); return -ENOSPC; } @@ -286,7 +286,7 @@ if (error) { iput(dir); inode->i_nlink = 0; - inode->i_dirt = 1; + mark_inode_dirty(inode); iput(inode); return error; } @@ -356,10 +356,10 @@ goto rmdir_done; inode->i_nlink=0; - inode->i_dirt=1; + mark_inode_dirty(inode); inode->i_ctime = dir->i_ctime = dir->i_mtime = CURRENT_TIME; dir->i_version = ++event; - dir->i_dirt=1; + mark_inode_dirty(dir); rmdir_done: iput(dir); iput(inode); @@ -392,7 +392,7 @@ if (!bh) { iput(dir); inode->i_nlink = 0; - inode->i_dirt = 1; + mark_inode_dirty(inode); iput(inode); return -EIO; } @@ -426,7 +426,7 @@ *p = 0; mark_buffer_dirty(bh,1); affs_brelse(bh); - inode->i_dirt = 1; + mark_inode_dirty(inode); bh = affs_find_entry(dir,name,len,&tmp); if (bh) { inode->i_nlink = 0; @@ -438,7 +438,7 @@ i = affs_add_entry(dir,NULL,inode,name,len,ST_SOFTLINK); if (i) { inode->i_nlink = 0; - inode->i_dirt = 1; + mark_inode_dirty(inode); iput(inode); affs_brelse(bh); iput(dir); @@ -497,7 +497,7 @@ error = affs_add_entry(dir,oldinode,inode,name,len,ST_LINKFILE); if (error) { inode->i_nlink = 0; - inode->i_dirt = 1; + mark_inode_dirty(inode); } iput(dir); iput(inode); @@ -616,9 +616,9 @@ goto retry; mark_buffer_dirty(new_bh,1); new_dir->i_version = ++event; - new_dir->i_dirt = 1; + mark_inode_dirty(new_dir); new_inode->i_nlink = 0; - new_inode->i_dirt = 1; + mark_inode_dirty(new_inode); } retval = affs_fix_hash_pred(old_dir,affs_hash_name(old_name,old_len,AFFS_I2FSTYPE(old_dir), AFFS_I2HSIZE(old_dir)) + 6,old_ino, @@ -632,8 +632,8 @@ new_dir->i_ctime = new_dir->i_mtime = old_dir->i_ctime = old_dir->i_mtime = CURRENT_TIME; new_dir->i_version = ++event; old_dir->i_version = ++event; - new_dir->i_dirt = 1; - old_dir->i_dirt = 1; + mark_inode_dirty(new_dir); + mark_inode_dirty(old_dir); mark_buffer_dirty(old_bh,1); end_rename: @@ -704,7 +704,7 @@ ofinode->i_size = inode->i_size; ofinode->i_uid = inode->i_uid; ofinode->i_gid = inode->i_gid; - ofinode->i_dirt = 1; + mark_inode_dirty(ofinode); link_key = ofinode->i_ino; /* Let all remaining links point to the new file */ @@ -722,7 +722,7 @@ "Inode %d in link chain is not a link", key); ofinode->u.affs_i.i_original = link_key; - ofinode->i_dirt = 1; + mark_inode_dirty(ofinode); FILE_END(nbh->b_data,inode)->original = htonl(link_key); } else affs_error(inode->i_sb,"fixup","Cannot read block %d",key); diff -u -r linux-2.1.48.org/fs/ncpfs/file.c linux-2.1.48/fs/ncpfs/file.c --- linux-2.1.48.org/fs/ncpfs/file.c Thu Aug 7 12:21:06 1997 +++ linux/fs/ncpfs/file.c Sun Aug 10 13:04:40 1997 @@ -130,8 +130,8 @@ if (!IS_RDONLY(inode)) { inode->i_atime = CURRENT_TIME; } - inode->i_dirt = 1; - + mark_inode_dirty(inode); + DPRINTK("ncp_file_read: exit %s\n", NCP_ISTRUCT(inode)->entryName); return already_read; @@ -192,8 +192,8 @@ } inode->i_mtime = inode->i_ctime = CURRENT_TIME; - inode->i_dirt = 1; - + mark_inode_dirty(inode); + file->f_pos = pos; if (pos > inode->i_size) { diff -u -r linux-2.1.48.org/fs/ncpfs/inode.c linux-2.1.48/fs/ncpfs/inode.c --- linux-2.1.48.org/fs/ncpfs/inode.c Thu Aug 7 12:02:23 1997 +++ linux/fs/ncpfs/inode.c Sun Aug 10 13:06:49 1997 @@ -165,7 +165,7 @@ } if ((data->ncp_fd >= NR_OPEN) || ((ncp_filp = current->files->fd[data->ncp_fd]) == NULL) - || (!S_ISSOCK(ncp_filp->f_inode->i_mode))) { + || (!S_ISSOCK(ncp_filp->f_dentry->d_inode->i_mode))) { printk("ncp_read_super: invalid ncp socket\n"); sb->s_dev = 0; return NULL; @@ -234,8 +234,8 @@ ncp_init_root(server); - if (!(sb->s_mounted = iget(sb, ncp_info_ino(server, - &(server->root))))) { + if (!(sb->s_root = d_alloc_root(iget(sb,ncp_info_ino(server, + &(server->root))),NULL))) { sb->s_dev = 0; printk("ncp_read_super: get root inode failed\n"); goto disconnect; diff -u -r linux-2.1.48.org/fs/ncpfs/mmap.c linux-2.1.48/fs/ncpfs/mmap.c --- linux-2.1.48.org/fs/ncpfs/mmap.c Thu Aug 7 12:22:37 1997 +++ linux/fs/ncpfs/mmap.c Sun Aug 10 13:07:10 1997 @@ -32,7 +32,7 @@ static unsigned long ncp_file_mmap_nopage(struct vm_area_struct *area, unsigned long address, int no_share) { - struct inode *inode = area->vm_inode; + struct inode *inode = area->vm_dentry->d_inode; unsigned long page; unsigned int clear; unsigned long tmp; @@ -130,7 +130,7 @@ return -EACCES; if (!IS_RDONLY(inode)) { inode->i_atime = CURRENT_TIME; - inode->i_dirt = 1; + mark_inode_dirty(inode); } vma->vm_dentry = dget(file->f_dentry); diff -u -r linux-2.1.48.org/fs/ncpfs/sock.c linux-2.1.48/fs/ncpfs/sock.c --- linux-2.1.48.org/fs/ncpfs/sock.c Thu Aug 7 12:06:42 1997 +++ linux/fs/ncpfs/sock.c Thu Aug 7 12:07:10 1997 @@ -102,7 +102,7 @@ struct ncp_reply_header reply; file = server->ncp_filp; - inode = file->f_inode; + inode = file->f_dentry->d_inode; sock = &inode->u.socket_i; if (!sock) { printk("ncp_rpc_call: socki_lookup failed\n"); diff -u -r linux-2.1.48.org/fs/smbfs/file.c linux-2.1.48/fs/smbfs/file.c --- linux-2.1.48.org/fs/smbfs/file.c Thu Aug 7 12:13:18 1997 +++ linux/fs/smbfs/file.c Sun Aug 10 13:07:48 1997 @@ -126,8 +126,8 @@ if (!IS_RDONLY(inode)) inode->i_atime = CURRENT_TIME; - inode->i_dirt = 1; - + mark_inode_dirty(inode); + DPRINTK("smb_file_read: exit %s\n", SMB_FINFO(inode)->name); return already_read; @@ -196,8 +196,8 @@ } inode->i_mtime = inode->i_ctime = CURRENT_TIME; - inode->i_dirt = 1; - + mark_inode_dirty(inode); + file->f_pos = pos; if (pos > inode->i_size) diff -u -r linux-2.1.48.org/fs/smbfs/inode.c linux-2.1.48/fs/smbfs/inode.c --- linux-2.1.48.org/fs/smbfs/inode.c Thu Aug 7 10:41:00 1997 +++ linux/fs/smbfs/inode.c Sun Aug 10 13:08:11 1997 @@ -228,7 +228,7 @@ sb->s_dev = 0; return NULL; } - if (!S_ISSOCK(filp->f_inode->i_mode)) + if (!S_ISSOCK(filp->f_dentry->d_inode->i_mode)) { printk("smb_read_super: not a socket!\n"); sb->s_dev = 0; @@ -305,7 +305,8 @@ } smb_init_root_dirent(server, &(server->root.finfo)); - if (!(sb->s_mounted = iget(sb, smb_info_ino(&(server->root))))) + if (!(sb->s_root = d_alloc_root(iget(sb, + smb_info_ino(&(server->root))),NULL))) { sb->s_dev = 0; printk("smb_read_super: get root inode failed\n"); diff -u -r linux-2.1.48.org/fs/smbfs/mmap.c linux-2.1.48/fs/smbfs/mmap.c --- linux-2.1.48.org/fs/smbfs/mmap.c Thu Aug 7 12:15:48 1997 +++ linux/fs/smbfs/mmap.c Sun Aug 10 13:09:11 1997 @@ -27,7 +27,7 @@ smb_file_mmap_nopage(struct vm_area_struct *area, unsigned long address, int no_share) { - struct inode *inode = area->vm_inode; + struct inode *inode = area->vm_dentry->d_inode; unsigned long page; unsigned int clear; unsigned long tmp; @@ -117,7 +117,7 @@ if (!IS_RDONLY(inode)) { inode->i_atime = CURRENT_TIME; - inode->i_dirt = 1; + mark_inode_dirty(inode); } vma->vm_dentry = dget(file->f_dentry); diff -u -r linux-2.1.48.org/fs/smbfs/sock.c linux-2.1.48/fs/smbfs/sock.c --- linux-2.1.48.org/fs/smbfs/sock.c Thu Aug 7 10:38:53 1997 +++ linux/fs/smbfs/sock.c Thu Aug 7 10:39:44 1997 @@ -128,7 +128,7 @@ if ((server == NULL) || ((file = server->sock_file) == NULL) - || ((inode = file->f_inode) == NULL) + || ((inode = file->f_dentry->d_inode) == NULL) || (!S_ISSOCK(inode->i_mode))) { printk("smb_catch_keepalive: did not get valid server!\n"); @@ -175,7 +175,7 @@ if ((server == NULL) || ((file = server->sock_file) == NULL) - || ((inode = file->f_inode) == NULL) + || ((inode = file->f_dentry->d_inode) == NULL) || (!S_ISSOCK(inode->i_mode))) { printk("smb_dont_catch_keepalive: " @@ -322,7 +322,7 @@ return NULL; if ((file = server->sock_file) == NULL) return NULL; - if ((inode = file->f_inode) == NULL) + if ((inode = file->f_dentry->d_inode) == NULL) return NULL; return &(inode->u.socket_i); } ---------------------------------------------------------- With best reggards, Alexandr. // MFUA // UCL // -=> kad@mfua.lugansk.ua <=- [Powered by RedHat]
| |