diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-09-04 19:22:54 +0300 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-09-04 19:22:54 +0300 |
commit | a6cbfa1e6d38c4b3ab0ce7e3aea4bb4e744f24b8 (patch) | |
tree | 8960e571a398b5d32e72bdb9c89ce965daa870ab /fs/quota | |
parent | f5308d1b83eba20e69df5e0926ba7257c8dd9074 (diff) | |
parent | 08d6ac9ee5fedd82040bc878705981b67a116a3f (diff) | |
download | linux-a6cbfa1e6d38c4b3ab0ce7e3aea4bb4e744f24b8.tar.xz |
Merge branch 'next' into for-linus
Prepare input updates for 4.14 merge window.
Diffstat (limited to 'fs/quota')
-rw-r--r-- | fs/quota/dquot.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index ebf80c7739e1..48813aeaab80 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c @@ -1512,6 +1512,22 @@ int dquot_initialize(struct inode *inode) } EXPORT_SYMBOL(dquot_initialize); +bool dquot_initialize_needed(struct inode *inode) +{ + struct dquot **dquots; + int i; + + if (!dquot_active(inode)) + return false; + + dquots = i_dquot(inode); + for (i = 0; i < MAXQUOTAS; i++) + if (!dquots[i] && sb_has_quota_active(inode->i_sb, i)) + return true; + return false; +} +EXPORT_SYMBOL(dquot_initialize_needed); + /* * Release all quotas referenced by inode. * |