From: Stephen Rothwell on
Hi Al,

After merging the vfs tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

fs/cifs/cifsfs.c:498: error: unknown field 'clear_inode' specified in initializer

Caused by commit 139f224817a203ff434eda5e6d3f457bc1579f27 ("cifs: define
inode-level cache object and register them") from the cifs tree
interacting with commit a8036d5aec0547a2bd7e3040c69bd172e474d860
("convert remaining ->clear_inode() to ->evict_inode()") from the vfs
tree.

I added the following merge fix patch (by effectively copy and paste from
some of the other file system fixups in the vfs commit). I have no idea
if this is correct - someone should check. I can carry this patch as
necessary.

From: Stephen Rothwell <sfr(a)canb.auug.org.au>
Date: Mon, 19 Jul 2010 10:15:47 +1000
Subject: [PATCH] cifs: fix for clear_inode -> evict_inode API change

Signed-off-by: Stephen Rothwell <sfr(a)canb.auug.org.au>
---
fs/cifs/cifsfs.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index ba893b9..2fc5ed1 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -330,8 +330,10 @@ cifs_destroy_inode(struct inode *inode)
}

static void
-cifs_clear_inode(struct inode *inode)
+cifs_evict_inode(struct inode *inode)
{
+ truncate_inode_pages(&inode->i_data, 0);
+ end_writeback(inode);
cifs_fscache_release_inode_cookie(inode);
}

@@ -495,7 +497,7 @@ static const struct super_operations cifs_super_ops = {
.alloc_inode = cifs_alloc_inode,
.destroy_inode = cifs_destroy_inode,
.drop_inode = cifs_drop_inode,
- .clear_inode = cifs_clear_inode,
+ .evict_inode = cifs_evict_inode,
/* .delete_inode = cifs_delete_inode, */ /* Do not need above
function unless later we add lazy close of inodes or unless the
kernel forgets to call us with the same number of releases (closes)
--
1.7.1


--
Cheers,
Stephen Rothwell sfr(a)canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Stephen Rothwell on
Hi Al,

On Mon, 19 Jul 2010 10:25:20 +1000 Stephen Rothwell <sfr(a)canb.auug.org.au> wrote:
>
> After merging the vfs tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
>
> fs/cifs/cifsfs.c:498: error: unknown field 'clear_inode' specified in initializer
>
> Caused by commit 139f224817a203ff434eda5e6d3f457bc1579f27 ("cifs: define
> inode-level cache object and register them") from the cifs tree
> interacting with commit a8036d5aec0547a2bd7e3040c69bd172e474d860
> ("convert remaining ->clear_inode() to ->evict_inode()") from the vfs
> tree.
>
> I added the following merge fix patch (by effectively copy and paste from
> some of the other file system fixups in the vfs commit). I have no idea
> if this is correct - someone should check. I can carry this patch as
> necessary.

The cifs tree has been merged by Linus, so this patch can be applied to
the vfs tree, now.

From: Stephen Rothwell <sfr(a)canb.auug.org.au>
Date: Mon, 19 Jul 2010 10:15:47 +1000
Subject: [PATCH] cifs: fix for clear_inode -> evict_inode API change

Signed-off-by: Stephen Rothwell <sfr(a)canb.auug.org.au>
---
fs/cifs/cifsfs.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index ba893b9..2fc5ed1 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -330,8 +330,10 @@ cifs_destroy_inode(struct inode *inode)
}

static void
-cifs_clear_inode(struct inode *inode)
+cifs_evict_inode(struct inode *inode)
{
+ truncate_inode_pages(&inode->i_data, 0);
+ end_writeback(inode);
cifs_fscache_release_inode_cookie(inode);
}

@@ -495,7 +497,7 @@ static const struct super_operations cifs_super_ops = {
.alloc_inode = cifs_alloc_inode,
.destroy_inode = cifs_destroy_inode,
.drop_inode = cifs_drop_inode,
- .clear_inode = cifs_clear_inode,
+ .evict_inode = cifs_evict_inode,
/* .delete_inode = cifs_delete_inode, */ /* Do not need above
function unless later we add lazy close of inodes or unless the
kernel forgets to call us with the same number of releases (closes)
--
1.7.1

--
Cheers,
Stephen Rothwell sfr(a)canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: Stephen Rothwell on
Hi Al,

On Tue, 22 Jun 2010 11:22:01 +1000 Stephen Rothwell <sfr(a)canb.auug.org.au> wrote:
>
> After merging the vfs tree, today's linux-next build (x86_64 allmodconfig)
> failed like this:
>
> fs/9p/vfs_inode.c: In function 'v9fs_vfs_setattr_dotl':
> fs/9p/vfs_inode.c:1056: error: implicit declaration of function 'inode_setattr'
>
> Caused by commit 463942d48d7f05812f0d6426dd8051ff53ea24a3 ("9p: Implement
> client side of setattr for 9P2000.L protocol") from the v9fs tree
> interacting with commit 3d9bf66940b6001a30aa30d5ac9f816326d9b3a0 ("remove
> inode_setattr") from the vfs tree.
>
> I have applied the following patch (using the changes in the above vfs
> tree commit as a guide) as a merge fix for today, but am not sure if it
> is correct. I assume that this (or something similar) could be applied
> to the v9fs tree now - is that correct Christoph?

Linus has merged the v9fs tree now, so this patch can be applied to the
vfs tree.

From: Stephen Rothwell <sfr(a)canb.auug.org.au>
Date: Tue, 22 Jun 2010 11:15:01 +1000
Subject: [PATCH] v9fs: fixup for inode_setattr being removed

Signed-off-by: Stephen Rothwell <sfr(a)canb.auug.org.au>
---
fs/9p/vfs_inode.c | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index f027a42..2ec7bfa 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -1052,10 +1052,19 @@ static int v9fs_vfs_setattr_dotl(struct dentry *dentry, struct iattr *iattr)
return PTR_ERR(fid);

retval = p9_client_setattr(fid, &p9attr);
- if (retval >= 0)
- retval = inode_setattr(dentry->d_inode, iattr);
+ if (retval < 0)
+ return retval;

- return retval;
+ if ((iattr->ia_valid & ATTR_SIZE) &&
+ iattr->ia_size != i_size_read(dentry->d_inode)) {
+ retval = vmtruncate(dentry->d_inode, iattr->ia_size);
+ if (retval)
+ return retval;
+ }
+
+ setattr_copy(dentry->d_inode, iattr);
+ mark_inode_dirty(dentry->d_inode);
+ return 0;
}

/**
--
1.7.1

--
Cheers,
Stephen Rothwell sfr(a)canb.auug.org.au
http://www.canb.auug.org.au/~sfr/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/