diff options
Diffstat (limited to 'fs/quota/dquot.c')
-rw-r--r-- | fs/quota/dquot.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/fs/quota/dquot.c b/fs/quota/dquot.c index cd83c5b871ba..6244bca45c9d 100644 --- a/fs/quota/dquot.c +++ b/fs/quota/dquot.c | |||
@@ -1821,6 +1821,20 @@ const struct dquot_operations dquot_operations = { | |||
1821 | }; | 1821 | }; |
1822 | 1822 | ||
1823 | /* | 1823 | /* |
1824 | * Generic helper for ->open on filesystems supporting disk quotas. | ||
1825 | */ | ||
1826 | int dquot_file_open(struct inode *inode, struct file *file) | ||
1827 | { | ||
1828 | int error; | ||
1829 | |||
1830 | error = generic_file_open(inode, file); | ||
1831 | if (!error && (file->f_mode & FMODE_WRITE)) | ||
1832 | vfs_dq_init(inode); | ||
1833 | return error; | ||
1834 | } | ||
1835 | EXPORT_SYMBOL(dquot_file_open); | ||
1836 | |||
1837 | /* | ||
1824 | * Turn quota off on a device. type == -1 ==> quotaoff for all types (umount) | 1838 | * Turn quota off on a device. type == -1 ==> quotaoff for all types (umount) |
1825 | */ | 1839 | */ |
1826 | int vfs_quota_disable(struct super_block *sb, int type, unsigned int flags) | 1840 | int vfs_quota_disable(struct super_block *sb, int type, unsigned int flags) |