Skip to content

Commit 824f06f

Browse files
committed
fs/9p: Revert "fs/9p: fix dups even in uncached mode"
This reverts commit be57855. It caused a regression involving duplicate inode numbers in some tester trees. The bad behavior seems to be dependent on inode reuse policy in underlying file system, so it did not trigger in my test setup. Signed-off-by: Eric Van Hensbergen <[email protected]>
1 parent 6e45a30 commit 824f06f

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

fs/9p/vfs_super.c

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,21 @@ static int v9fs_statfs(struct dentry *dentry, struct kstatfs *buf)
244244
return res;
245245
}
246246

247+
static int v9fs_drop_inode(struct inode *inode)
248+
{
249+
struct v9fs_session_info *v9ses;
250+
251+
v9ses = v9fs_inode2v9ses(inode);
252+
if (v9ses->cache & (CACHE_META|CACHE_LOOSE))
253+
return generic_drop_inode(inode);
254+
/*
255+
* in case of non cached mode always drop the
256+
* inode because we want the inode attribute
257+
* to always match that on the server.
258+
*/
259+
return 1;
260+
}
261+
247262
static int v9fs_write_inode(struct inode *inode,
248263
struct writeback_control *wbc)
249264
{
@@ -278,6 +293,7 @@ static const struct super_operations v9fs_super_ops_dotl = {
278293
.alloc_inode = v9fs_alloc_inode,
279294
.free_inode = v9fs_free_inode,
280295
.statfs = v9fs_statfs,
296+
.drop_inode = v9fs_drop_inode,
281297
.evict_inode = v9fs_evict_inode,
282298
.show_options = v9fs_show_options,
283299
.umount_begin = v9fs_umount_begin,

0 commit comments

Comments
 (0)