610 lines
24 KiB
Diff
610 lines
24 KiB
Diff
---
|
|
src/inode.c | 194 ++++++++++++++++++++++++++++++------------------------------
|
|
1 file changed, 97 insertions(+), 97 deletions(-)
|
|
|
|
Index: novfs-2.0.0/src/inode.c
|
|
===================================================================
|
|
--- novfs-2.0.0.orig/src/inode.c
|
|
+++ novfs-2.0.0/src/inode.c
|
|
@@ -422,9 +422,9 @@ int Novfs_Remove_from_Root(char *RemoveN
|
|
dentry = d_lookup( Novfs_root, &name);
|
|
if (dentry)
|
|
{
|
|
- if (dentry->d_inode && dentry->d_inode->u.generic_ip)
|
|
+ if (dentry->d_inode && dentry->d_inode->i_private)
|
|
{
|
|
- ((PINODE_DATA)(dentry->d_inode->u.generic_ip))->Scope = NULL;
|
|
+ ((PINODE_DATA)(dentry->d_inode->i_private))->Scope = NULL;
|
|
}
|
|
dput(dentry);
|
|
}
|
|
@@ -535,9 +535,9 @@ int Novfs_Add_to_Root2(char *AddName)
|
|
inode->i_mtime = CURRENT_TIME;
|
|
if ( !Novfs_d_add(Novfs_root, entry, inode, 1))
|
|
{
|
|
- if (inode->u.generic_ip)
|
|
+ if (inode->i_private)
|
|
{
|
|
- ((PINODE_DATA)inode->u.generic_ip)->Flags = USER_INODE;
|
|
+ ((PINODE_DATA)inode->i_private)->Flags = USER_INODE;
|
|
}
|
|
PRINT_DENTRY("After Novfs_d_add", entry);
|
|
}
|
|
@@ -651,7 +651,7 @@ int verify_dentry( struct dentry *dentry
|
|
|
|
if ( dentry && dentry->d_parent &&
|
|
(dir = dentry->d_parent->d_inode) &&
|
|
- (id = dir->u.generic_ip) )
|
|
+ (id = dir->i_private) )
|
|
{
|
|
parent = dget_parent(dentry);
|
|
|
|
@@ -675,7 +675,7 @@ int verify_dentry( struct dentry *dentry
|
|
/*
|
|
* Values don't match so update.
|
|
*/
|
|
- ((PINODE_DATA)inode->u.generic_ip)->Flags |= UPDATE_INODE;
|
|
+ ((PINODE_DATA)inode->i_private)->Flags |= UPDATE_INODE;
|
|
}
|
|
|
|
ctime = get_jiffies_64() - ctime;
|
|
@@ -776,9 +776,9 @@ int verify_dentry( struct dentry *dentry
|
|
id->Flags &= ~UPDATE_INODE;
|
|
|
|
dentry->d_inode->i_flags &= ~S_DEAD;
|
|
- if (dentry->d_inode->u.generic_ip)
|
|
+ if (dentry->d_inode->i_private)
|
|
{
|
|
- ((PINODE_DATA)dentry->d_inode->u.generic_ip)->Scope = id->Scope;
|
|
+ ((PINODE_DATA)dentry->d_inode->i_private)->Scope = id->Scope;
|
|
}
|
|
}
|
|
}
|
|
@@ -877,9 +877,9 @@ int Novfs_d_add(struct dentry *Parent, s
|
|
Novfs_Free(buf);
|
|
}
|
|
|
|
- if ( Parent && Parent->d_inode && Parent->d_inode->u.generic_ip)
|
|
+ if ( Parent && Parent->d_inode && Parent->d_inode->i_private)
|
|
{
|
|
- id = (PINODE_DATA)Parent->d_inode->u.generic_ip;
|
|
+ id = (PINODE_DATA)Parent->d_inode->i_private;
|
|
}
|
|
|
|
if (id && id->Scope)
|
|
@@ -891,7 +891,7 @@ int Novfs_d_add(struct dentry *Parent, s
|
|
scope = Scope_Get_ScopefromPath( d );
|
|
}
|
|
|
|
- ((PINODE_DATA)i->u.generic_ip)->Scope = scope;
|
|
+ ((PINODE_DATA)i->i_private)->Scope = scope;
|
|
|
|
d->d_time = jiffies+(File_update_timeout*HZ);
|
|
if (a)
|
|
@@ -944,7 +944,7 @@ int Novfs_d_revalidate(struct dentry *de
|
|
if ( dentry->d_inode &&
|
|
dentry->d_parent &&
|
|
(dir = dentry->d_parent->d_inode) &&
|
|
- (id = dir->u.generic_ip) )
|
|
+ (id = dir->i_private) )
|
|
{
|
|
/*
|
|
* Check timer to see if in valid time limit
|
|
@@ -1399,15 +1399,15 @@ int Novfs_dir_readdir(struct file * file
|
|
{
|
|
if (!file->private_data)
|
|
{
|
|
- if ( inode && inode->u.generic_ip )
|
|
+ if ( inode && inode->i_private )
|
|
{
|
|
- sessionId = Scope_Get_SessionId(((PINODE_DATA)inode->u.generic_ip)->Scope);
|
|
+ sessionId = Scope_Get_SessionId(((PINODE_DATA)inode->i_private)->Scope);
|
|
if (0 == sessionId)
|
|
{
|
|
- ((PINODE_DATA)inode->u.generic_ip)->Scope = Scope_Get_ScopefromPath(file->f_dentry);
|
|
- sessionId = Scope_Get_SessionId(((PINODE_DATA)inode->u.generic_ip)->Scope);
|
|
+ ((PINODE_DATA)inode->i_private)->Scope = Scope_Get_ScopefromPath(file->f_dentry);
|
|
+ sessionId = Scope_Get_SessionId(((PINODE_DATA)inode->i_private)->Scope);
|
|
}
|
|
- uid = Scope_Get_Uid(((PINODE_DATA)inode->u.generic_ip)->Scope);
|
|
+ uid = Scope_Get_Uid(((PINODE_DATA)inode->i_private)->Scope);
|
|
}
|
|
else
|
|
{
|
|
@@ -1501,9 +1501,9 @@ int Novfs_dir_readdir(struct file * file
|
|
struct inode *dinode = file->private_data;
|
|
PINODE_DATA id = (PINODE_DATA)((char *)file->private_data+sizeof(struct inode));
|
|
|
|
- dinode->u.generic_ip = id;
|
|
+ dinode->i_private = id;
|
|
|
|
- id->Scope = ((PINODE_DATA)inode->u.generic_ip)->Scope;
|
|
+ id->Scope = ((PINODE_DATA)inode->i_private)->Scope;
|
|
id->Flags = 0;
|
|
INIT_LIST_HEAD( &id->DirCache );
|
|
init_MUTEX( &id->DirCacheLock );
|
|
@@ -1616,7 +1616,7 @@ ssize_t Novfs_f_read(struct file *file,
|
|
|
|
if ( file->f_dentry &&
|
|
(inode = file->f_dentry->d_inode) &&
|
|
- (id = (PINODE_DATA)inode->u.generic_ip))
|
|
+ (id = (PINODE_DATA)inode->i_private))
|
|
{
|
|
|
|
DbgPrint("Novfs_f_read(0x%x 0x%p %d %lld %.*s)\n",
|
|
@@ -1685,7 +1685,7 @@ ssize_t Novfs_f_write(struct file *file,
|
|
|
|
if ( file->f_dentry &&
|
|
(inode = file->f_dentry->d_inode) &&
|
|
- (id = file->f_dentry->d_inode->u.generic_ip) )
|
|
+ (id = file->f_dentry->d_inode->i_private) )
|
|
{
|
|
DbgPrint("Novfs_f_write(0x%x %d %lld %.*s)\n", (unsigned long)file->private_data, len, offset, file->f_dentry->d_name.len, file->f_dentry->d_name.name);
|
|
|
|
@@ -1844,9 +1844,9 @@ int Novfs_f_open(struct inode *inode, st
|
|
DbgPrint("Novfs_f_open: %.*s f_flags=0%o f_mode=0%o i_mode=0%o\n", file->f_dentry->d_name.len, file->f_dentry->d_name.name, file->f_flags, file->f_mode, inode->i_mode);
|
|
}
|
|
|
|
- if (inode && inode->u.generic_ip)
|
|
+ if (inode && inode->i_private)
|
|
{
|
|
- id = (PINODE_DATA)file->f_dentry->d_inode->u.generic_ip;
|
|
+ id = (PINODE_DATA)file->f_dentry->d_inode->i_private;
|
|
session = Scope_Get_SessionId(id->Scope);
|
|
if (0 == session)
|
|
{
|
|
@@ -1888,7 +1888,7 @@ int Novfs_f_open(struct inode *inode, st
|
|
ino = 0;
|
|
if (Novfs_get_entry(dir, &file->f_dentry->d_name, &ino, info))
|
|
{
|
|
- ((PINODE_DATA)inode->u.generic_ip)->Flags |= UPDATE_INODE;
|
|
+ ((PINODE_DATA)inode->i_private)->Flags |= UPDATE_INODE;
|
|
}
|
|
|
|
Novfs_unlock_inode_cache(dir);
|
|
@@ -1956,7 +1956,7 @@ int Novfs_f_release(struct inode *inode,
|
|
file->f_dentry->d_name.name,
|
|
(unsigned long)file->private_data);
|
|
|
|
- if ( file->f_dentry->d_inode && (id = file->f_dentry->d_inode->u.generic_ip))
|
|
+ if ( file->f_dentry->d_inode && (id = file->f_dentry->d_inode->i_private))
|
|
{
|
|
session = Scope_Get_SessionId(id->Scope);
|
|
if (0 == session)
|
|
@@ -2109,13 +2109,13 @@ int Novfs_a_writepage(struct page* page,
|
|
{
|
|
int retCode = -EFAULT;
|
|
struct inode *inode = page->mapping->host;
|
|
- PINODE_DATA id = inode->u.generic_ip;
|
|
+ PINODE_DATA id = inode->i_private;
|
|
loff_t pos = ((loff_t)page->index << PAGE_CACHE_SHIFT);
|
|
session_t session=0;
|
|
DATA_LIST dlst[2];
|
|
size_t len = PAGE_CACHE_SIZE;
|
|
|
|
- session = Scope_Get_SessionId(((PINODE_DATA)inode->u.generic_ip)->Scope);
|
|
+ session = Scope_Get_SessionId(((PINODE_DATA)inode->i_private)->Scope);
|
|
|
|
page_cache_get(page);
|
|
|
|
@@ -2185,10 +2185,10 @@ int Novfs_a_writepages(struct address_sp
|
|
{
|
|
DbgPrint(" Inode=0x%x Ino=%d\n", inode, inode->i_ino);
|
|
|
|
- if (inode->u.generic_ip)
|
|
+ if (inode->i_private)
|
|
{
|
|
- session = Scope_Get_SessionId(((PINODE_DATA)inode->u.generic_ip)->Scope);
|
|
- fh = ((PINODE_DATA)inode->u.generic_ip)->FileHandle;
|
|
+ session = Scope_Get_SessionId(((PINODE_DATA)inode->i_private)->Scope);
|
|
+ fh = ((PINODE_DATA)inode->i_private)->FileHandle;
|
|
}
|
|
}
|
|
|
|
@@ -2427,13 +2427,13 @@ int Novfs_a_readpage(struct file *file,
|
|
{
|
|
DbgPrint(" Inode=0x%x Ino=%d", inode, inode->i_ino);
|
|
|
|
- if (inode->u.generic_ip)
|
|
+ if (inode->i_private)
|
|
{
|
|
- session = Scope_Get_SessionId(((PINODE_DATA)inode->u.generic_ip)->Scope);
|
|
+ session = Scope_Get_SessionId(((PINODE_DATA)inode->i_private)->Scope);
|
|
if (0 == session)
|
|
{
|
|
- ((PINODE_DATA)inode->u.generic_ip)->Scope = Scope_Get_ScopefromPath( file->f_dentry );
|
|
- session = Scope_Get_SessionId(((PINODE_DATA)inode->u.generic_ip)->Scope);
|
|
+ ((PINODE_DATA)inode->i_private)->Scope = Scope_Get_ScopefromPath( file->f_dentry );
|
|
+ session = Scope_Get_SessionId(((PINODE_DATA)inode->i_private)->Scope);
|
|
}
|
|
}
|
|
}
|
|
@@ -2519,13 +2519,13 @@ int Novfs_a_readpages(struct file *file,
|
|
{
|
|
DbgPrint(" Inode=0x%x Ino=%d\n", inode, inode->i_ino);
|
|
|
|
- if (inode->u.generic_ip)
|
|
+ if (inode->i_private)
|
|
{
|
|
- session = Scope_Get_SessionId(((PINODE_DATA)inode->u.generic_ip)->Scope);
|
|
+ session = Scope_Get_SessionId(((PINODE_DATA)inode->i_private)->Scope);
|
|
if (0 == session)
|
|
{
|
|
- ((PINODE_DATA)inode->u.generic_ip)->Scope = Scope_Get_ScopefromPath( file->f_dentry );
|
|
- session = Scope_Get_SessionId(((PINODE_DATA)inode->u.generic_ip)->Scope);
|
|
+ ((PINODE_DATA)inode->i_private)->Scope = Scope_Get_ScopefromPath( file->f_dentry );
|
|
+ session = Scope_Get_SessionId(((PINODE_DATA)inode->i_private)->Scope);
|
|
}
|
|
}
|
|
}
|
|
@@ -2653,13 +2653,13 @@ int Novfs_a_prepare_write(struct file *f
|
|
*/
|
|
if (file->f_dentry && file->f_dentry->d_inode)
|
|
{
|
|
- if (file->f_dentry->d_inode->u.generic_ip)
|
|
+ if (file->f_dentry->d_inode->i_private)
|
|
{
|
|
- session = Scope_Get_SessionId(((PINODE_DATA)inode->u.generic_ip)->Scope);
|
|
+ session = Scope_Get_SessionId(((PINODE_DATA)inode->i_private)->Scope);
|
|
if (0 == session)
|
|
{
|
|
- ((PINODE_DATA)inode->u.generic_ip)->Scope = Scope_Get_ScopefromPath( file->f_dentry );
|
|
- session = Scope_Get_SessionId(((PINODE_DATA)inode->u.generic_ip)->Scope);
|
|
+ ((PINODE_DATA)inode->i_private)->Scope = Scope_Get_ScopefromPath( file->f_dentry );
|
|
+ session = Scope_Get_SessionId(((PINODE_DATA)inode->i_private)->Scope);
|
|
}
|
|
}
|
|
}
|
|
@@ -2741,7 +2741,7 @@ int Novfs_a_commit_write(struct file *fi
|
|
size_t len = to - offset;
|
|
|
|
DbgPrint("Novfs_a_commit_write: File=0x%p Page=0x%p offset=0x%x To=%u filesize=%lld\n", file, page, offset, to, i_size_read(file->f_dentry->d_inode));
|
|
- if (file->f_dentry->d_inode && (id = file->f_dentry->d_inode->u.generic_ip))
|
|
+ if (file->f_dentry->d_inode && (id = file->f_dentry->d_inode->i_private))
|
|
{
|
|
session = Scope_Get_SessionId(id->Scope);
|
|
if (0 == session)
|
|
@@ -2836,13 +2836,13 @@ int Novfs_i_create(struct inode *dir, st
|
|
|
|
if (mode | S_IFREG)
|
|
{
|
|
- if (dir->u.generic_ip)
|
|
+ if (dir->i_private)
|
|
{
|
|
- session = Scope_Get_SessionId( ((PINODE_DATA)dir->u.generic_ip)->Scope);
|
|
+ session = Scope_Get_SessionId( ((PINODE_DATA)dir->i_private)->Scope);
|
|
if (0 == session)
|
|
{
|
|
- ((PINODE_DATA)dir->u.generic_ip)->Scope = Scope_Get_ScopefromPath( dentry );
|
|
- session = Scope_Get_SessionId(((PINODE_DATA)dir->u.generic_ip)->Scope);
|
|
+ ((PINODE_DATA)dir->i_private)->Scope = Scope_Get_ScopefromPath( dentry );
|
|
+ session = Scope_Get_SessionId(((PINODE_DATA)dir->i_private)->Scope);
|
|
}
|
|
|
|
buf = (char *)Novfs_Malloc(PATH_LENGTH_BUFFER, GFP_KERNEL);
|
|
@@ -2859,7 +2859,7 @@ int Novfs_i_create(struct inode *dir, st
|
|
{
|
|
if (dentry->d_inode)
|
|
{
|
|
- ((PINODE_DATA)dentry->d_inode->u.generic_ip)->Flags |= UPDATE_INODE;
|
|
+ ((PINODE_DATA)dentry->d_inode->i_private)->Flags |= UPDATE_INODE;
|
|
}
|
|
}
|
|
}
|
|
@@ -2951,7 +2951,7 @@ struct dentry * Novfs_i_lookup(struct in
|
|
|
|
DbgPrint("Novfs_i_lookup: dir 0x%x %d name %.*s hash %d inode 0x%0p\n", dir, dir->i_ino, dentry->d_name.len, dentry->d_name.name, dentry->d_name.hash, dentry->d_inode);
|
|
|
|
- if (dir && (id = dir->u.generic_ip) )
|
|
+ if (dir && (id = dir->i_private) )
|
|
{
|
|
retVal = 0;
|
|
if ( IS_ROOT( dentry ))
|
|
@@ -3066,13 +3066,13 @@ int Novfs_i_unlink(struct inode *dir, st
|
|
if ( inode )
|
|
{
|
|
DbgPrint("Novfs_i_unlink: dir=0x%x dir->i_ino=%d inode=0x%x ino=%d\n", dir, dir->i_ino, inode, inode->i_ino);
|
|
- if (inode->u.generic_ip)
|
|
+ if (inode->i_private)
|
|
{
|
|
- session = Scope_Get_SessionId(((PINODE_DATA)inode->u.generic_ip)->Scope);
|
|
+ session = Scope_Get_SessionId(((PINODE_DATA)inode->i_private)->Scope);
|
|
if (0 == session)
|
|
{
|
|
- ((PINODE_DATA)inode->u.generic_ip)->Scope = Scope_Get_ScopefromPath( dentry );
|
|
- session = Scope_Get_SessionId(((PINODE_DATA)inode->u.generic_ip)->Scope);
|
|
+ ((PINODE_DATA)inode->i_private)->Scope = Scope_Get_ScopefromPath( dentry );
|
|
+ session = Scope_Get_SessionId(((PINODE_DATA)inode->i_private)->Scope);
|
|
}
|
|
|
|
buf = (char *)Novfs_Malloc(PATH_LENGTH_BUFFER, GFP_KERNEL);
|
|
@@ -3142,16 +3142,16 @@ int Novfs_i_mkdir(struct inode *dir, str
|
|
|
|
mode |= S_IFDIR;
|
|
mode &= (S_IFMT | S_IRWXU);
|
|
- if ( dir->u.generic_ip )
|
|
+ if ( dir->i_private )
|
|
{
|
|
- session = Scope_Get_SessionId( ((PINODE_DATA)dir->u.generic_ip)->Scope);
|
|
+ session = Scope_Get_SessionId( ((PINODE_DATA)dir->i_private)->Scope);
|
|
if (0 == session)
|
|
{
|
|
- ((PINODE_DATA)dir->u.generic_ip)->Scope = Scope_Get_ScopefromPath( dentry );
|
|
- session = Scope_Get_SessionId(((PINODE_DATA)dir->u.generic_ip)->Scope);
|
|
+ ((PINODE_DATA)dir->i_private)->Scope = Scope_Get_ScopefromPath( dentry );
|
|
+ session = Scope_Get_SessionId(((PINODE_DATA)dir->i_private)->Scope);
|
|
}
|
|
|
|
- uid = Scope_Get_Uid( ((PINODE_DATA)dir->u.generic_ip)->Scope);
|
|
+ uid = Scope_Get_Uid( ((PINODE_DATA)dir->i_private)->Scope);
|
|
buf = (char *)Novfs_Malloc(PATH_LENGTH_BUFFER, GFP_KERNEL);
|
|
if (buf)
|
|
{
|
|
@@ -3170,7 +3170,7 @@ int Novfs_i_mkdir(struct inode *dir, str
|
|
if (inode)
|
|
{
|
|
update_inode(inode, &info);
|
|
- ((PINODE_DATA)inode->u.generic_ip)->Flags &= ~UPDATE_INODE;
|
|
+ ((PINODE_DATA)inode->i_private)->Flags &= ~UPDATE_INODE;
|
|
|
|
dentry->d_time = jiffies+(File_update_timeout*HZ);
|
|
|
|
@@ -3238,9 +3238,9 @@ int Novfs_i_mknod(struct inode *dir, str
|
|
return(-EACCES);
|
|
}
|
|
|
|
- if ( ((PINODE_DATA)dir->u.generic_ip) )
|
|
+ if ( ((PINODE_DATA)dir->i_private) )
|
|
{
|
|
- uid = Scope_Get_Uid( ((PINODE_DATA)dir->u.generic_ip)->Scope);
|
|
+ uid = Scope_Get_Uid( ((PINODE_DATA)dir->i_private)->Scope);
|
|
if (mode & (S_IFREG | S_IFDIR))
|
|
{
|
|
inode = Novfs_get_inode(dir->i_sb, mode, dev, uid, 0, &dentry->d_name);
|
|
@@ -3344,27 +3344,27 @@ int Novfs_i_rename(struct inode *odir, s
|
|
if ( !Novfs_d_strcmp(&newname, &oldname))
|
|
{
|
|
|
|
- if ( od->d_inode && od->d_inode->u.generic_ip )
|
|
+ if ( od->d_inode && od->d_inode->i_private )
|
|
{
|
|
|
|
- if (nd->d_inode && nd->d_inode->u.generic_ip)
|
|
+ if (nd->d_inode && nd->d_inode->i_private)
|
|
{
|
|
- session = Scope_Get_SessionId(((PINODE_DATA)ndir->u.generic_ip)->Scope);
|
|
+ session = Scope_Get_SessionId(((PINODE_DATA)ndir->i_private)->Scope);
|
|
if (0 == session)
|
|
{
|
|
- ((PINODE_DATA)ndir->u.generic_ip)->Scope = Scope_Get_ScopefromPath( nd );
|
|
- session = Scope_Get_SessionId(((PINODE_DATA)ndir->u.generic_ip)->Scope);
|
|
+ ((PINODE_DATA)ndir->i_private)->Scope = Scope_Get_ScopefromPath( nd );
|
|
+ session = Scope_Get_SessionId(((PINODE_DATA)ndir->i_private)->Scope);
|
|
}
|
|
|
|
retCode = Novfs_Delete(newpath, S_ISDIR(nd->d_inode->i_mode), session);
|
|
}
|
|
|
|
|
|
- session = Scope_Get_SessionId(((PINODE_DATA)ndir->u.generic_ip)->Scope);
|
|
+ session = Scope_Get_SessionId(((PINODE_DATA)ndir->i_private)->Scope);
|
|
if (0 == session)
|
|
{
|
|
- ((PINODE_DATA)ndir->u.generic_ip)->Scope = Scope_Get_ScopefromPath( nd );
|
|
- session = Scope_Get_SessionId(((PINODE_DATA)ndir->u.generic_ip)->Scope);
|
|
+ ((PINODE_DATA)ndir->i_private)->Scope = Scope_Get_ScopefromPath( nd );
|
|
+ session = Scope_Get_SessionId(((PINODE_DATA)ndir->i_private)->Scope);
|
|
}
|
|
retCode = Novfs_Rename_File(
|
|
S_ISDIR(od->d_inode->i_mode),
|
|
@@ -3458,13 +3458,13 @@ int Novfs_i_setattr(struct dentry *dentr
|
|
return(-EACCES);
|
|
}
|
|
|
|
- if (inode && inode->u.generic_ip)
|
|
+ if (inode && inode->i_private)
|
|
{
|
|
- session = Scope_Get_SessionId( ((PINODE_DATA)inode->u.generic_ip)->Scope);
|
|
+ session = Scope_Get_SessionId( ((PINODE_DATA)inode->i_private)->Scope);
|
|
if (0 == session)
|
|
{
|
|
- ((PINODE_DATA)inode->u.generic_ip)->Scope = Scope_Get_ScopefromPath( dentry );
|
|
- session = Scope_Get_SessionId(((PINODE_DATA)inode->u.generic_ip)->Scope);
|
|
+ ((PINODE_DATA)inode->i_private)->Scope = Scope_Get_ScopefromPath( dentry );
|
|
+ session = Scope_Get_SessionId(((PINODE_DATA)inode->i_private)->Scope);
|
|
}
|
|
|
|
buf = (char *)Novfs_Malloc(PATH_LENGTH_BUFFER, GFP_KERNEL);
|
|
@@ -3513,7 +3513,7 @@ int Novfs_i_setattr(struct dentry *dentr
|
|
|
|
if ( !(retVal = Novfs_Set_Attr(path, attr, session) ) )
|
|
{
|
|
- ((PINODE_DATA)inode->u.generic_ip)->Flags |= UPDATE_INODE;
|
|
+ ((PINODE_DATA)inode->i_private)->Flags |= UPDATE_INODE;
|
|
|
|
if (ia_valid & ATTR_ATIME)
|
|
inode->i_atime = attr->ia_atime;
|
|
@@ -3563,7 +3563,7 @@ int Novfs_i_getattr(struct vfsmount *mnt
|
|
!IS_ROOT(dentry->d_parent) )
|
|
{
|
|
session = 0;
|
|
- id = dentry->d_inode->u.generic_ip;
|
|
+ id = dentry->d_inode->i_private;
|
|
|
|
if (id && (id->Flags & UPDATE_INODE) )
|
|
{
|
|
@@ -3744,9 +3744,9 @@ void Novfs_clear_inode(struct inode *ino
|
|
{
|
|
InodeCount--;
|
|
|
|
- if ( inode->u.generic_ip )
|
|
+ if ( inode->i_private )
|
|
{
|
|
- PINODE_DATA id=inode->u.generic_ip;
|
|
+ PINODE_DATA id=inode->i_private;
|
|
|
|
DbgPrint("Novfs_clear_inode: inode=0x%x ino=%d Scope=0x%p Name=%s\n", inode, inode->i_ino, id->Scope, id->Name);
|
|
|
|
@@ -3757,8 +3757,8 @@ void Novfs_clear_inode(struct inode *ino
|
|
up( &InodeList_lock );
|
|
|
|
|
|
- Novfs_Free(inode->u.generic_ip);
|
|
- inode->u.generic_ip = NULL;
|
|
+ Novfs_Free(inode->i_private);
|
|
+ inode->i_private = NULL;
|
|
|
|
remove_inode_hash( inode );
|
|
|
|
@@ -3921,12 +3921,12 @@ struct inode *Novfs_get_inode(struct sup
|
|
|
|
DbgPrint("Novfs_get_inode: Inode=0x%p I_ino=%d len=%d\n", inode, inode->i_ino, name->len);
|
|
|
|
- if (NULL != (inode->u.generic_ip = Novfs_Malloc(sizeof(INODE_DATA)+name->len, GFP_KERNEL)))
|
|
+ if (NULL != (inode->i_private = Novfs_Malloc(sizeof(INODE_DATA)+name->len, GFP_KERNEL)))
|
|
{
|
|
PINODE_DATA id;
|
|
- id = inode->u.generic_ip;
|
|
+ id = inode->i_private;
|
|
|
|
- DbgPrint("Novfs_get_inode: u.generic_ip 0x%p\n", id);
|
|
+ DbgPrint("Novfs_get_inode: i_private 0x%p\n", id);
|
|
|
|
id->Scope = NULL;
|
|
id->Flags = 0;
|
|
@@ -4343,7 +4343,7 @@ int Novfs_lock_inode_cache( struct inode
|
|
int retVal = 0;
|
|
|
|
DbgPrint("Novfs_lock_inode_cache: 0x%p\n", i);
|
|
- if ( i && (id = i->u.generic_ip) && id->DirCache.next )
|
|
+ if ( i && (id = i->i_private) && id->DirCache.next )
|
|
{
|
|
down( &id->DirCacheLock );
|
|
retVal = 1;
|
|
@@ -4369,7 +4369,7 @@ void Novfs_unlock_inode_cache( struct in
|
|
{
|
|
PINODE_DATA id;
|
|
|
|
- if ( i && (id = i->u.generic_ip) && id->DirCache.next )
|
|
+ if ( i && (id = i->i_private) && id->DirCache.next )
|
|
{
|
|
up( &id->DirCacheLock );
|
|
}
|
|
@@ -4397,7 +4397,7 @@ int Novfs_enumerate_inode_cache( struct
|
|
int retVal = -1;
|
|
|
|
|
|
- if ( i && (id = i->u.generic_ip) && id->DirCache.next )
|
|
+ if ( i && (id = i->i_private) && id->DirCache.next )
|
|
{
|
|
if ( (NULL == iteration) || (NULL == *iteration) )
|
|
{
|
|
@@ -4456,7 +4456,7 @@ int Novfs_get_entry( struct inode *i, st
|
|
char *n="<NULL>";
|
|
int nl=6;
|
|
|
|
- if ( i && (id = i->u.generic_ip) && id->DirCache.next )
|
|
+ if ( i && (id = i->i_private) && id->DirCache.next )
|
|
{
|
|
if (name && name->len)
|
|
{
|
|
@@ -4545,7 +4545,7 @@ int Novfs_get_entry_time( struct inode *
|
|
char *n="<NULL>";
|
|
int nl=6;
|
|
|
|
- if ( i && (id = i->u.generic_ip) && id->DirCache.next )
|
|
+ if ( i && (id = i->i_private) && id->DirCache.next )
|
|
{
|
|
if (name && name->len)
|
|
{
|
|
@@ -4605,7 +4605,7 @@ int Novfs_get_remove_entry( struct inode
|
|
int retVal = -1;
|
|
|
|
|
|
- if ( i && (id = i->u.generic_ip) && id->DirCache.next )
|
|
+ if ( i && (id = i->i_private) && id->DirCache.next )
|
|
{
|
|
l = id->DirCache.next;
|
|
|
|
@@ -4653,7 +4653,7 @@ void Novfs_invalidate_inode_cache( struc
|
|
PDIR_CACHE dc;
|
|
struct list_head *l;
|
|
|
|
- if ( i && (id = i->u.generic_ip) && id->DirCache.next )
|
|
+ if ( i && (id = i->i_private) && id->DirCache.next )
|
|
{
|
|
list_for_each(l, &id->DirCache)
|
|
{
|
|
@@ -4690,7 +4690,7 @@ PDIR_CACHE Novfs_lookup_inode_cache( str
|
|
int nl=6;
|
|
int hash=0;
|
|
|
|
- if ( i && (id = i->u.generic_ip) && id->DirCache.next )
|
|
+ if ( i && (id = i->i_private) && id->DirCache.next )
|
|
{
|
|
if (name && name->name)
|
|
{
|
|
@@ -4768,7 +4768,7 @@ int Novfs_lookup_validate( struct inode
|
|
char *n="<NULL>";
|
|
int nl=6;
|
|
|
|
- if ( i && (id = i->u.generic_ip) && id->DirCache.next )
|
|
+ if ( i && (id = i->i_private) && id->DirCache.next )
|
|
{
|
|
if (name && name->len)
|
|
{
|
|
@@ -4815,7 +4815,7 @@ int Novfs_add_inode_entry(
|
|
PDIR_CACHE new;
|
|
int retVal = -ENOMEM;
|
|
|
|
- if ( i && (id = i->u.generic_ip) && id->DirCache.next )
|
|
+ if ( i && (id = i->i_private) && id->DirCache.next )
|
|
{
|
|
new = Novfs_Malloc(sizeof(DIR_CACHE)+name->len, GFP_KERNEL);
|
|
if (new)
|
|
@@ -4888,7 +4888,7 @@ int Novfs_update_entry( struct inode *i,
|
|
char mtime_buf[32];
|
|
char ctime_buf[32];
|
|
|
|
- if ( i && (id = i->u.generic_ip) && id->DirCache.next )
|
|
+ if ( i && (id = i->i_private) && id->DirCache.next )
|
|
{
|
|
|
|
if (name && name->len)
|
|
@@ -4966,7 +4966,7 @@ void Novfs_remove_inode_entry( struct in
|
|
char *n="<NULL>";
|
|
int nl=6;
|
|
|
|
- if ( i && (id = i->u.generic_ip) && id->DirCache.next )
|
|
+ if ( i && (id = i->i_private) && id->DirCache.next )
|
|
{
|
|
dc = Novfs_lookup_inode_cache( i, name, ino );
|
|
if (dc)
|
|
@@ -5015,7 +5015,7 @@ void Novfs_free_invalid_entries( struct
|
|
PDIR_CACHE dc;
|
|
struct list_head *l;
|
|
|
|
- if ( i && (id = i->u.generic_ip) && id->DirCache.next )
|
|
+ if ( i && (id = i->i_private) && id->DirCache.next )
|
|
{
|
|
list_for_each( l, &id->DirCache )
|
|
{
|
|
@@ -5057,7 +5057,7 @@ void Novfs_free_inode_cache( struct inod
|
|
PDIR_CACHE dc;
|
|
struct list_head *l;
|
|
|
|
- if ( i && (id = i->u.generic_ip) && id->DirCache.next )
|
|
+ if ( i && (id = i->i_private) && id->DirCache.next )
|
|
{
|
|
list_for_each( l, &id->DirCache )
|
|
{
|
|
@@ -5109,7 +5109,7 @@ Novfs_dump_inode_cache(int argc, const c
|
|
kdb_printf("Inode: 0x%p\n", inode);
|
|
if (inode)
|
|
{
|
|
- id = inode->u.generic_ip;
|
|
+ id = inode->i_private;
|
|
kdb_printf("INODE_DATA: 0x%p\n", id);
|
|
|
|
if ( id && id->DirCache.next )
|