staging: lustre: libcfs: remove MMSPACE macros
Another abstraction that is not needed. Signed-off-by: James Simmons <uja.ornl@gmail.com> Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6245 Reviewed-on: http://review.whamcloud.com/13841 Reviewed-by: frank zago <fzago@cray.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
badc9feddf
commit
e3e30e10c5
@ -65,9 +65,4 @@
|
|||||||
#define NUM_CACHEPAGES totalram_pages
|
#define NUM_CACHEPAGES totalram_pages
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define DECL_MMSPACE mm_segment_t __oldfs
|
|
||||||
#define MMSPACE_OPEN \
|
|
||||||
do { __oldfs = get_fs(); set_fs(get_ds()); } while (0)
|
|
||||||
#define MMSPACE_CLOSE set_fs(__oldfs)
|
|
||||||
|
|
||||||
#endif /* __LINUX_CFS_MEM_H__ */
|
#endif /* __LINUX_CFS_MEM_H__ */
|
||||||
|
@ -707,10 +707,9 @@ int cfs_tracefile_dump_all_pages(char *filename)
|
|||||||
struct cfs_trace_page *tage;
|
struct cfs_trace_page *tage;
|
||||||
struct cfs_trace_page *tmp;
|
struct cfs_trace_page *tmp;
|
||||||
char *buf;
|
char *buf;
|
||||||
|
mm_segment_t __oldfs;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
DECL_MMSPACE;
|
|
||||||
|
|
||||||
cfs_tracefile_write_lock();
|
cfs_tracefile_write_lock();
|
||||||
|
|
||||||
filp = filp_open(filename, O_CREAT | O_EXCL | O_WRONLY | O_LARGEFILE,
|
filp = filp_open(filename, O_CREAT | O_EXCL | O_WRONLY | O_LARGEFILE,
|
||||||
@ -729,11 +728,12 @@ int cfs_tracefile_dump_all_pages(char *filename)
|
|||||||
rc = 0;
|
rc = 0;
|
||||||
goto close;
|
goto close;
|
||||||
}
|
}
|
||||||
|
__oldfs = get_fs();
|
||||||
|
set_fs(get_ds());
|
||||||
|
|
||||||
/* ok, for now, just write the pages. in the future we'll be building
|
/* ok, for now, just write the pages. in the future we'll be building
|
||||||
* iobufs with the pages and calling generic_direct_IO
|
* iobufs with the pages and calling generic_direct_IO
|
||||||
*/
|
*/
|
||||||
MMSPACE_OPEN;
|
|
||||||
list_for_each_entry_safe(tage, tmp, &pc.pc_pages, linkage) {
|
list_for_each_entry_safe(tage, tmp, &pc.pc_pages, linkage) {
|
||||||
__LASSERT_TAGE_INVARIANT(tage);
|
__LASSERT_TAGE_INVARIANT(tage);
|
||||||
|
|
||||||
@ -752,7 +752,7 @@ int cfs_tracefile_dump_all_pages(char *filename)
|
|||||||
list_del(&tage->linkage);
|
list_del(&tage->linkage);
|
||||||
cfs_tage_free(tage);
|
cfs_tage_free(tage);
|
||||||
}
|
}
|
||||||
MMSPACE_CLOSE;
|
set_fs(__oldfs);
|
||||||
rc = vfs_fsync(filp, 1);
|
rc = vfs_fsync(filp, 1);
|
||||||
if (rc)
|
if (rc)
|
||||||
pr_err("sync returns %d\n", rc);
|
pr_err("sync returns %d\n", rc);
|
||||||
@ -986,13 +986,12 @@ static int tracefiled(void *arg)
|
|||||||
struct tracefiled_ctl *tctl = arg;
|
struct tracefiled_ctl *tctl = arg;
|
||||||
struct cfs_trace_page *tage;
|
struct cfs_trace_page *tage;
|
||||||
struct cfs_trace_page *tmp;
|
struct cfs_trace_page *tmp;
|
||||||
|
mm_segment_t __oldfs;
|
||||||
struct file *filp;
|
struct file *filp;
|
||||||
char *buf;
|
char *buf;
|
||||||
int last_loop = 0;
|
int last_loop = 0;
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
DECL_MMSPACE;
|
|
||||||
|
|
||||||
/* we're started late enough that we pick up init's fs context */
|
/* we're started late enough that we pick up init's fs context */
|
||||||
/* this is so broken in uml? what on earth is going on? */
|
/* this is so broken in uml? what on earth is going on? */
|
||||||
|
|
||||||
@ -1025,8 +1024,8 @@ static int tracefiled(void *arg)
|
|||||||
__LASSERT(list_empty(&pc.pc_pages));
|
__LASSERT(list_empty(&pc.pc_pages));
|
||||||
goto end_loop;
|
goto end_loop;
|
||||||
}
|
}
|
||||||
|
__oldfs = get_fs();
|
||||||
MMSPACE_OPEN;
|
set_fs(get_ds());
|
||||||
|
|
||||||
list_for_each_entry_safe(tage, tmp, &pc.pc_pages, linkage) {
|
list_for_each_entry_safe(tage, tmp, &pc.pc_pages, linkage) {
|
||||||
static loff_t f_pos;
|
static loff_t f_pos;
|
||||||
@ -1051,7 +1050,7 @@ static int tracefiled(void *arg)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MMSPACE_CLOSE;
|
set_fs(__oldfs);
|
||||||
|
|
||||||
filp_close(filp, NULL);
|
filp_close(filp, NULL);
|
||||||
put_pages_on_daemon_list(&pc);
|
put_pages_on_daemon_list(&pc);
|
||||||
|
Loading…
Reference in New Issue
Block a user