aboutsummaryrefslogtreecommitdiffstats
path: root/fs/dlm/lock.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/dlm/lock.c')
-rw-r--r--fs/dlm/lock.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/dlm/lock.c b/fs/dlm/lock.c
index fa68e9b93651..bc2e4ba4c1be 100644
--- a/fs/dlm/lock.c
+++ b/fs/dlm/lock.c
@@ -1851,7 +1851,7 @@ static void send_blocking_asts_all(struct dlm_rsb *r, struct dlm_lkb *lkb)
1851static int set_master(struct dlm_rsb *r, struct dlm_lkb *lkb) 1851static int set_master(struct dlm_rsb *r, struct dlm_lkb *lkb)
1852{ 1852{
1853 struct dlm_ls *ls = r->res_ls; 1853 struct dlm_ls *ls = r->res_ls;
1854 int error, dir_nodeid, ret_nodeid, our_nodeid = dlm_our_nodeid(); 1854 int i, error, dir_nodeid, ret_nodeid, our_nodeid = dlm_our_nodeid();
1855 1855
1856 if (rsb_flag(r, RSB_MASTER_UNCERTAIN)) { 1856 if (rsb_flag(r, RSB_MASTER_UNCERTAIN)) {
1857 rsb_clear_flag(r, RSB_MASTER_UNCERTAIN); 1857 rsb_clear_flag(r, RSB_MASTER_UNCERTAIN);
@@ -1885,7 +1885,7 @@ static int set_master(struct dlm_rsb *r, struct dlm_lkb *lkb)
1885 return 1; 1885 return 1;
1886 } 1886 }
1887 1887
1888 for (;;) { 1888 for (i = 0; i < 2; i++) {
1889 /* It's possible for dlm_scand to remove an old rsb for 1889 /* It's possible for dlm_scand to remove an old rsb for
1890 this same resource from the toss list, us to create 1890 this same resource from the toss list, us to create
1891 a new one, look up the master locally, and find it 1891 a new one, look up the master locally, and find it
@@ -1899,6 +1899,8 @@ static int set_master(struct dlm_rsb *r, struct dlm_lkb *lkb)
1899 log_debug(ls, "dir_lookup error %d %s", error, r->res_name); 1899 log_debug(ls, "dir_lookup error %d %s", error, r->res_name);
1900 schedule(); 1900 schedule();
1901 } 1901 }
1902 if (error && error != -EEXIST)
1903 return error;
1902 1904
1903 if (ret_nodeid == our_nodeid) { 1905 if (ret_nodeid == our_nodeid) {
1904 r->res_first_lkid = 0; 1906 r->res_first_lkid = 0;