From: Andrew Morton Date: Sun, 10 Dec 2006 10:19:44 +0000 (-0800) Subject: [PATCH] io-accounting-read-accounting cifs fix X-Git-Tag: v2.6.20-rc1~145^2~58 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f88cc2e9c29c181557b477ee396375906acbc90;p=linux-2.6 [PATCH] io-accounting-read-accounting cifs fix CIFS implements ->readpages and doesn't use read_cache_pages(). So wire the read IO accounting up within CIFS. Cc: Jay Lan Cc: Shailabh Nagar Cc: Balbir Singh Cc: Chris Sturtivant Cc: Tony Ernst Cc: Guillaume Thouvenin Cc: Steven French Cc: David Wright Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 1aa95a50ca..0f05cab5d2 100644 --- a/fs/cifs/file.c +++ b/fs/cifs/file.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include #include "cifsfs.h" @@ -1812,6 +1813,7 @@ static int cifs_readpages(struct file *file, struct address_space *mapping, cFYI(1, ("Read error in readpages: %d", rc)); break; } else if (bytes_read > 0) { + task_io_account_read(bytes_read); pSMBr = (struct smb_com_read_rsp *)smb_read_data; cifs_copy_cache_pages(mapping, page_list, bytes_read, smb_read_data + 4 /* RFC1001 hdr */ +