git_open_noatime(): drop unused parameter

Since commit c793430 (Limit file descriptors used by packs, 2011-02-28), the extra parameter added in f2e872aa (Work around EMFILE when there are too many pack files, 2010-11-01) is not used anymore. Remove it. Signed-off-by: Junio C Hamano <gitster@pobox.com> Acked-by: Shawn O. Pearce <spearce@spearce.org>

Junio C Hamano committed May 15, 2011 at 12:16 UTC f4e516834ecedffc330c9735a5665104f8488055
1 file changed +7 -8
sha1_file.c
+7 -8
@@ -31,8 +31,6 @@ static inline uintmax_t sz_fmt(size_t s) { return s; }
31
32 const unsigned char null_sha1[20];
33
34 -static int git_open_noatime(const char *name, struct packed_git *p);
35 -
34 /*
35 * This is meant to hold a *small* number of objects that you would
36 * want read_sha1_file() to be able to return, but yet you do not want
@@ -227,6 +225,7 @@ struct alternate_object_database *alt_odb_list;
225 static struct alternate_object_database **alt_odb_tail;
226
227 static void read_info_alternates(const char * alternates, int depth);
228 +static int git_open_noatime(const char *name);
229
230 /*
231 * Prepare alternate object database registry.
@@ -360,7 +359,7 @@ static void read_info_alternates(const char * relative_base, int depth)
359 int fd;
360
361 sprintf(path, "%s/%s", relative_base, alt_file_name);
363 - fd = git_open_noatime(path, NULL);
362 + fd = git_open_noatime(path);
363 if (fd < 0)
364 return;
365 if (fstat(fd, &st) || (st.st_size == 0)) {
@@ -475,7 +474,7 @@ static int check_packed_git_idx(const char *path, struct packed_git *p)
474 struct pack_idx_header *hdr;
475 size_t idx_size;
476 uint32_t version, nr, i, *index;
478 - int fd = git_open_noatime(path, p);
477 + int fd = git_open_noatime(path);
478 struct stat st;
479
480 if (fd < 0)
@@ -757,7 +756,7 @@ static int open_packed_git_1(struct packed_git *p)
756 while (pack_max_fds <= pack_open_fds && unuse_one_window(NULL, -1))
757 ; /* nothing */
758
760 - p->pack_fd = git_open_noatime(p->pack_name, p);
759 + p->pack_fd = git_open_noatime(p->pack_name);
760 if (p->pack_fd < 0 || fstat(p->pack_fd, &st))
761 return -1;
762 pack_open_fds++;
@@ -1145,7 +1144,7 @@ int check_sha1_signature(const unsigned char *sha1, void *map, unsigned long siz
1144 return hashcmp(sha1, real_sha1) ? -1 : 0;
1145 }
1146
1148 -static int git_open_noatime(const char *name, struct packed_git *p)
1147 +static int git_open_noatime(const char *name)
1148 {
1149 static int sha1_file_open_flag = O_NOATIME;
1150
@@ -1170,7 +1169,7 @@ static int open_sha1_file(const unsigned char *sha1)
1169 char *name = sha1_file_name(sha1);
1170 struct alternate_object_database *alt;
1171
1173 - fd = git_open_noatime(name, NULL);
1172 + fd = git_open_noatime(name);
1173 if (fd >= 0)
1174 return fd;
1175
@@ -1179,7 +1178,7 @@ static int open_sha1_file(const unsigned char *sha1)
1178 for (alt = alt_odb_list; alt; alt = alt->next) {
1179 name = alt->name;
1180 fill_sha1_path(name, sha1);
1182 - fd = git_open_noatime(alt->base, NULL);
1181 + fd = git_open_noatime(alt->base);
1182 if (fd >= 0)
1183 return fd;
1184 }