summaryrefslogtreecommitdiff
path: root/fs/nfs/write.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2019-11-06 10:52:10 +0100
committerJan Kara <jack@suse.cz>2019-11-06 10:52:10 +0100
commitdae82c7fd0926840c832151f3258ba751f73d348 (patch)
tree5cdef8359f6cfb964919ffb0bfa36d2de60140b1 /fs/nfs/write.c
parenta9913d7eafa74eb2e34e26aa31fe80449b999f8e (diff)
parenta0828b6ccbdfd46afbbaa9f28df359081c29109b (diff)
Pull series refactoring quota enabling and disabling code.
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r--fs/nfs/write.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 85ca49549b39..52cab65f91cf 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -786,7 +786,6 @@ static void nfs_inode_remove_request(struct nfs_page *req)
struct nfs_inode *nfsi = NFS_I(inode);
struct nfs_page *head;
- atomic_long_dec(&nfsi->nrequests);
if (nfs_page_group_sync_on_bit(req, PG_REMOVE)) {
head = req->wb_head;
@@ -799,8 +798,10 @@ static void nfs_inode_remove_request(struct nfs_page *req)
spin_unlock(&mapping->private_lock);
}
- if (test_and_clear_bit(PG_INODE_REF, &req->wb_flags))
+ if (test_and_clear_bit(PG_INODE_REF, &req->wb_flags)) {
nfs_release_request(req);
+ atomic_long_dec(&nfsi->nrequests);
+ }
}
static void