diff options
Diffstat (limited to 'fs/proc/namespaces.c')
-rw-r--r-- | fs/proc/namespaces.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/proc/namespaces.c b/fs/proc/namespaces.c index 9ae46b8..49a7fff 100644 --- a/fs/proc/namespaces.c +++ b/fs/proc/namespaces.c @@ -42,6 +42,12 @@ static const struct inode_operations ns_inode_operations = { .setattr = proc_setattr, }; +static int ns_delete_dentry(const struct dentry *dentry) +{ + /* Don't cache namespace inodes when not in use */ + return 1; +} + static char *ns_dname(struct dentry *dentry, char *buffer, int buflen) { struct inode *inode = dentry->d_inode; @@ -53,7 +59,7 @@ static char *ns_dname(struct dentry *dentry, char *buffer, int buflen) const struct dentry_operations ns_dentry_operations = { - .d_delete = always_delete_dentry, + .d_delete = ns_delete_dentry, .d_dname = ns_dname, }; |