Skip to content

Commit 85f5491

Browse files
committed
libceph: drop started parameter of __ceph_open_session()
With the previous commit revamping the timeout handling, started isn't used anymore. It could be taken into account by adjusting the initial value of the timeout, but there is little point as both callers capture the timestamp shortly before calling __ceph_open_session() -- the only thing of note that happens in the interim is taking client->mount_mutex and that isn't expected to take multiple seconds. Signed-off-by: Ilya Dryomov <idryomov@gmail.com> Reviewed-by: Viacheslav Dubeyko <Slava.Dubeyko@ibm.com>
1 parent 076381c commit 85f5491

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

fs/ceph/super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1149,7 +1149,7 @@ static struct dentry *ceph_real_mount(struct ceph_fs_client *fsc,
11491149
const char *path = fsc->mount_options->server_path ?
11501150
fsc->mount_options->server_path + 1 : "";
11511151

1152-
err = __ceph_open_session(fsc->client, started);
1152+
err = __ceph_open_session(fsc->client);
11531153
if (err < 0)
11541154
goto out;
11551155

include/linux/ceph/libceph.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -306,8 +306,7 @@ struct ceph_entity_addr *ceph_client_addr(struct ceph_client *client);
306306
u64 ceph_client_gid(struct ceph_client *client);
307307
extern void ceph_destroy_client(struct ceph_client *client);
308308
extern void ceph_reset_client_addr(struct ceph_client *client);
309-
extern int __ceph_open_session(struct ceph_client *client,
310-
unsigned long started);
309+
extern int __ceph_open_session(struct ceph_client *client);
311310
extern int ceph_open_session(struct ceph_client *client);
312311
int ceph_wait_for_latest_osdmap(struct ceph_client *client,
313312
unsigned long timeout);

net/ceph/ceph_common.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ EXPORT_SYMBOL(ceph_reset_client_addr);
788788
/*
789789
* mount: join the ceph cluster, and open root directory.
790790
*/
791-
int __ceph_open_session(struct ceph_client *client, unsigned long started)
791+
int __ceph_open_session(struct ceph_client *client)
792792
{
793793
DEFINE_WAIT_FUNC(wait, woken_wake_function);
794794
long timeout = ceph_timeout_jiffies(client->options->mount_timeout);
@@ -844,12 +844,11 @@ EXPORT_SYMBOL(__ceph_open_session);
844844
int ceph_open_session(struct ceph_client *client)
845845
{
846846
int ret;
847-
unsigned long started = jiffies; /* note the start time */
848847

849848
dout("open_session start\n");
850849
mutex_lock(&client->mount_mutex);
851850

852-
ret = __ceph_open_session(client, started);
851+
ret = __ceph_open_session(client);
853852

854853
mutex_unlock(&client->mount_mutex);
855854
return ret;

0 commit comments

Comments
 (0)