[PATCH 03/13] fs/acct: Pass a NULL pointer to __kernel_write

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



We do nothing with the updated pos, so we can pass in NULL here.

Signed-off-by: Matthew Wilcox (Oracle) <willy@xxxxxxxxxxxxx>
---
 kernel/acct.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/kernel/acct.c b/kernel/acct.c
index b0c5b3a9f5af..08f0ec28d188 100644
--- a/kernel/acct.c
+++ b/kernel/acct.c
@@ -517,9 +517,7 @@ static void do_acct_process(struct bsd_acct_struct *acct)
 	 * as we could deadlock the system otherwise.
 	 */
 	if (file_start_write_trylock(file)) {
-		/* it's been opened O_APPEND, so position is irrelevant */
-		loff_t pos = 0;
-		__kernel_write(file, &ac, sizeof(acct_t), &pos);
+		__kernel_write(file, &ac, sizeof(acct_t), NULL);
 		file_end_write(file);
 	}
 out:
-- 
2.28.0




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux