From 2c67aa322f1dbf79134d49848ec6f9a99c90c3c7 Mon Sep 17 00:00:00 2001 From: braam Date: Fri, 8 Aug 2003 09:51:03 +0000 Subject: [PATCH] b=1614 r=phil This bug fix was complicated by the fact that many code paths that never had run now execute. We changed intent error returns (already committed), and error returns inside mds_open. This includes a kernel fix but no version change, as I made it backward compatible. Fixes for open: - kernel passes FMODE_EXEC to lustre, which sends it to MDS - move all open/close code to mds_open.c, make almost everything static - arrange for allow/deny/get/put write access in mds - fix several problems with error handling in mds_dentry_open: - don't do a wrong mntput - do a dget for readability - add test to sanityN and sanity - simplify confusing permission checking in mds_open with helper --- lustre/mds/mds_internal.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lustre/mds/mds_internal.h b/lustre/mds/mds_internal.h index 45ee994..80d48b5 100644 --- a/lustre/mds/mds_internal.h +++ b/lustre/mds/mds_internal.h @@ -13,10 +13,6 @@ struct llog_handle *mds_log_open(struct obd_device *obd, struct llog_handle *mds_get_catalog(struct obd_device *obd); void mds_put_catalog(struct llog_handle *cathandle); -/* mds/handler.c */ -struct mds_file_data *mds_mfd_new(void); -void mds_mfd_put(struct mds_file_data *mfd); -void mds_mfd_destroy(struct mds_file_data *mfd); /* mds/mds_reint.c */ void mds_commit_cb(struct obd_device *, __u64 last_rcvd, void *data, int error); @@ -35,6 +31,10 @@ int mds_get_lovtgts(struct mds_obd *mds, int tgt_count, int mds_open(struct mds_update_record *rec, int offset, struct ptlrpc_request *req, struct lustre_handle *); int mds_pin(struct ptlrpc_request *req); +int mds_mfd_close(struct ptlrpc_request *req, struct obd_device *obd, + struct mds_file_data *mfd); +int mds_close(struct ptlrpc_request *req); + /* mds/mds_fs.c */ int mds_client_add(struct obd_device *obd, struct mds_obd *mds, -- 1.8.3.1