mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-21 14:11:20 +00:00
quota: Propagate error from ->acquire_dquot()
Currently when some error happened in ->acquire_dquot(), dqget() just returned NULL. That was indistinguishable from a case when e.g. someone run quotaoff and so was generally silently ignored. However ->acquire_dquot() can fail because of ENOSPC or EIO in which case user should better know. So propagate error up from ->acquire_dquot properly. Signed-off-by: Jan Kara <jack@suse.cz>
This commit is contained in:
parent
d725e66c06
commit
6184fc0b8d
4 changed files with 72 additions and 33 deletions
|
@ -43,7 +43,7 @@ void inode_claim_rsv_space(struct inode *inode, qsize_t number);
|
|||
void inode_sub_rsv_space(struct inode *inode, qsize_t number);
|
||||
void inode_reclaim_rsv_space(struct inode *inode, qsize_t number);
|
||||
|
||||
void dquot_initialize(struct inode *inode);
|
||||
int dquot_initialize(struct inode *inode);
|
||||
void dquot_drop(struct inode *inode);
|
||||
struct dquot *dqget(struct super_block *sb, struct kqid qid);
|
||||
static inline struct dquot *dqgrab(struct dquot *dquot)
|
||||
|
@ -200,8 +200,9 @@ static inline int sb_has_quota_active(struct super_block *sb, int type)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static inline void dquot_initialize(struct inode *inode)
|
||||
static inline int dquot_initialize(struct inode *inode)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline void dquot_drop(struct inode *inode)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue