stable/branches/experimental/net-fs/novell-novfs/files/novell-novfs-2.0.0-i_blksize.patch

68 lines
2.9 KiB
Diff
Raw Normal View History

2007-07-09 12:53:37 +02:00
---
src/inode.c | 14 ++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)
Index: novfs-2.0.0/src/inode.c
===================================================================
--- novfs-2.0.0.orig/src/inode.c
+++ novfs-2.0.0/src/inode.c
@@ -1731,7 +1731,7 @@ ssize_t Novfs_f_write(struct file *file,
if (offset > i_size_read(inode))
{
i_size_write(inode, offset);
- inode->i_blocks = (offset + inode->i_blksize - 1) >> inode->i_blkbits;
+ inode->i_blocks = (offset + inode->i_sb->s_blocksize - 1) >> inode->i_blkbits;
}
inode->i_mtime = inode->i_atime = CURRENT_TIME;
id->Flags |= UPDATE_INODE;
@@ -2913,12 +2913,12 @@ void update_inode(struct inode *Inode, P
Inode->i_ctime = Info->ctime;
Inode->i_mtime = Info->mtime;
- if (Inode->i_size && Inode->i_blksize)
+ if (Inode->i_size && Inode->i_sb->s_blocksize)
{
Inode->i_blocks = (u_long)(Info->size >> (loff_t)Inode->i_blkbits);
- Inode->i_bytes = Info->size & (Inode->i_blksize - 1);
+ Inode->i_bytes = Info->size & (Inode->i_sb->s_blocksize - 1);
- DbgPrint("update_inode: i_blksize=%d\n", Inode->i_blksize);
+ DbgPrint("update_inode: i_blksize=%d\n", Inode->i_sb->s_blocksize);
DbgPrint("update_inode: i_blkbits=%d\n", Inode->i_blkbits);
DbgPrint("update_inode: i_blocks=%d\n", Inode->i_blocks);
DbgPrint("update_inode: i_bytes=%d\n", Inode->i_bytes);
@@ -3604,7 +3604,7 @@ int Novfs_i_getattr(struct vfsmount *mnt
kstat->atime = inode->i_atime;
kstat->mtime = inode->i_mtime;
kstat->ctime = inode->i_ctime;
- kstat->blksize = inode->i_blksize;
+ kstat->blksize = inode->i_sb->s_blocksize;
kstat->blocks = inode->i_blocks;
if (inode->i_bytes)
{
@@ -3909,7 +3909,6 @@ struct inode *Novfs_get_inode(struct sup
inode->i_mode = mode;
inode->i_uid = Uid;
inode->i_gid = 0;
- inode->i_blksize = sb->s_blocksize;
inode->i_blkbits = sb->s_blocksize_bits;
inode->i_blocks = 0;
inode->i_rdev = 0;
@@ -3962,7 +3961,6 @@ struct inode *Novfs_get_inode(struct sup
case S_IFDIR:
inode->i_op = &Novfs_inode_operations;
inode->i_fop = &Novfs_dir_operations;
- inode->i_blksize = 0;
inode->i_blkbits = 0;
break;
@@ -3973,7 +3971,7 @@ struct inode *Novfs_get_inode(struct sup
DbgPrint("Novfs_get_inode: size=%lld\n", inode->i_size);
DbgPrint("Novfs_get_inode: mode=0%o\n", inode->i_mode);
- DbgPrint("Novfs_get_inode: i_blksize=%d\n", inode->i_blksize);
+ DbgPrint("Novfs_get_inode: i_blksize=%d\n", inode->i_sb->s_blocksize);
DbgPrint("Novfs_get_inode: i_blkbits=%d\n", inode->i_blkbits);
DbgPrint("Novfs_get_inode: i_blocks=%d\n", inode->i_blocks);
DbgPrint("Novfs_get_inode: i_bytes=%d\n", inode->i_bytes);