diff options
author | Miklos Szeredi <mszeredi@redhat.com> | 2018-07-18 16:44:40 +0300 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2018-07-18 16:44:40 +0300 |
commit | d3b1084dfd629ef89bc1c4bab95e5cb87e7d08c2 (patch) | |
tree | fc662e9a1ce492bbb5e090b7ecc375a1d81bd280 /fs/open.c | |
parent | 51e6ce820bd43e51883eddf291bd830217bb6382 (diff) | |
download | linux-d3b1084dfd629ef89bc1c4bab95e5cb87e7d08c2.tar.xz |
vfs: make open_with_fake_path() not contribute to nr_files
Stacking file operations in overlay will store an extra open file for each
overlay file opened.
The overhead is just that of "struct file" which is about 256bytes, because
overlay already pins an extra dentry and inode when the file is open, which
add up to a much larger overhead.
For fear of breaking working setups, don't start accounting the extra file.
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to 'fs/open.c')
-rw-r--r-- | fs/open.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/open.c b/fs/open.c index dd15711eb658..9c6617dbb2c0 100644 --- a/fs/open.c +++ b/fs/open.c @@ -928,7 +928,7 @@ EXPORT_SYMBOL(dentry_open); struct file *open_with_fake_path(const struct path *path, int flags, struct inode *inode, const struct cred *cred) { - struct file *f = alloc_empty_file(flags, cred); + struct file *f = alloc_empty_file_noaccount(flags, cred); if (!IS_ERR(f)) { int error; |