From 4fb642709124d0c8f849e624fda2860c99d1ede4 Mon Sep 17 00:00:00 2001 From: Chun Xu Date: Fri, 16 May 2014 19:18:28 +0800 Subject: active-standby: check inode's i_private Check whether inode's i_private fild has been changed before saving current task_strucct pointer to this field. Bug 200000044 Change-Id: I4a09caf016193801c5841b82e024f8ef41a3763f Reviewed-on: http://git-master/r/411287 (cherry picked from commit 3fef90e08330c9ed11f84adf8f98492d3b917ddb) Reviewed-on: http://git-master/r/414844 (cherry picked from commit 3ea271e7ca33bf281a3fba3580865f2c1d85ae0c) Signed-off-by: Chun Xu Reviewed-on: http://git-master/r/427088 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Bharat Nihalani GVS: Gerrit_Virtual_Submit --- fs/eventpoll.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'fs') diff --git a/fs/eventpoll.c b/fs/eventpoll.c index ab2157896d1d..047accde593d 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c @@ -9,7 +9,7 @@ * * Davide Libenzi * - * Copyright (c) 2013, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2013-2014, NVIDIA CORPORATION. All rights reserved. * */ @@ -1290,7 +1290,9 @@ static int ep_insert(struct eventpoll *ep, struct epoll_event *event, spin_lock(&tfile->f_lock); list_add_tail(&epi->fllink, &tfile->f_ep_links); spin_unlock(&tfile->f_lock); - tfile->f_path.dentry->d_inode->i_private = get_thread_process(current); + if (tfile->f_path.dentry->d_inode->i_private == NULL) + tfile->f_path.dentry->d_inode->i_private = + get_thread_process(current); /* * Add the current item to the RB tree. All RB tree operations are -- cgit v1.2.3