diff options
author | Andrew Perepechko <andrew.perepechko@seagate.com> | 2016-08-24 11:11:53 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-09-01 17:25:46 +0200 |
commit | 3da76276127dc6cd78ba98f1cefe9e95faf17863 (patch) | |
tree | 91becb0cdb7e3cebca3a289f23e34b65701b07bd /drivers/staging/lustre/lustre/mdc/mdc_request.c | |
parent | 371991353af424559eaeae147d094c8612099d73 (diff) | |
download | op-kernel-dev-3da76276127dc6cd78ba98f1cefe9e95faf17863.zip op-kernel-dev-3da76276127dc6cd78ba98f1cefe9e95faf17863.tar.gz |
staging/lustre: avoid clearing i_nlink for inodes in use
The patch removes find_cbdata callbacks and clear_nlink
from dentry_iput path, since this piece of code makes
a few races possible.
The test case reproduces one of the possible races
described in LU-7925:
1) two hard links are created for the same file
2) the test calls stat(2) for link #1
3) in the middle of 2) the test opens and closes link #2
4) in the middle of 2) the test drops the ldlm locks and
forces dentry reclaim via vm.drop_caches=2
5) in the middle of 2) ll_d_iput() clears i_nlink for
the inode
6) the initial stat(2) continues and copies the wrong
i_nlink value into st_nlink
Signed-off-by: Andrew Perepechko <andrew.perepechko@seagate.com>
Seagate-bug-id: MRP-3271
Reviewed-on: http://review.whamcloud.com/19164
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7925
Reviewed-by: Wally Wang <wang@cray.com>
Reviewed-by: Lai Siyao <lai.siyao@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lustre/mdc/mdc_request.c')
-rw-r--r-- | drivers/staging/lustre/lustre/mdc/mdc_request.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c index 313889a..5bf95f9 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_request.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c @@ -2874,7 +2874,6 @@ static struct obd_ops mdc_obd_ops = { static struct md_ops mdc_md_ops = { .getstatus = mdc_getstatus, .null_inode = mdc_null_inode, - .find_cbdata = mdc_find_cbdata, .close = mdc_close, .create = mdc_create, .done_writing = mdc_done_writing, |